-------------------------------------------------------------------------------- Profile data file 'results/clgout-nightly-2026-08-15-regex-automata-0.4.8-Clippy-IncrPatched2-Threads1' (creator: callgrind-3.25.1) -------------------------------------------------------------------------------- I1 cache: D1 cache: LL cache: Timerange: Basic block 0 - 661043801 Trigger: Program termination Profiled target: /home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver --crate-name regex_automata --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 --cfg feature="alloc" --cfg feature="default" --cfg feature="dfa" --cfg feature="dfa-build" --cfg feature="dfa-onepass" --cfg feature="dfa-search" --cfg feature="hybrid" --cfg feature="meta" --cfg feature="nfa" --cfg feature="nfa-backtrack" --cfg feature="nfa-pikevm" --cfg feature="nfa-thompson" --cfg feature="perf" --cfg feature="perf-inline" --cfg feature="perf-literal" --cfg feature="perf-literal-multisubstring" --cfg feature="perf-literal-substring" --cfg feature="std" --cfg feature="syntax" --cfg feature="unicode" --cfg feature="unicode-age" --cfg feature="unicode-bool" --cfg feature="unicode-case" --cfg feature="unicode-gencat" --cfg feature="unicode-perl" --cfg feature="unicode-script" --cfg feature="unicode-segment" --cfg feature="unicode-word-boundary" --check-cfg cfg(docsrs,test) --check-cfg cfg(feature, values("alloc", "default", "dfa", "dfa-build", "dfa-onepass", "dfa-search", "hybrid", "internal-instrument", "internal-instrument-pikevm", "logging", "meta", "nfa", "nfa-backtrack", "nfa-pikevm", "nfa-thompson", "perf", "perf-inline", "perf-literal", "perf-literal-multisubstring", "perf-literal-substring", "std", "syntax", "unicode", "unicode-age", "unicode-bool", "unicode-case", "unicode-gencat", "unicode-perl", "unicode-script", "unicode-segment", "unicode-word-boundary")) -C metadata=627845f840fb5561 -C extra-filename=-6a83dcf5ca048296 --out-dir /tmp/.tmp9ZT37p/target/debug/deps -L dependency=/tmp/.tmp9ZT37p/target/debug/deps --extern aho_corasick=/tmp/.tmp9ZT37p/target/debug/deps/libaho_corasick-3511cd792f6874ba.rmeta --extern memchr=/tmp/.tmp9ZT37p/target/debug/deps/libmemchr-f185c6acef45aa4f.rmeta --extern regex_syntax=/tmp/.tmp9ZT37p/target/debug/deps/libregex_syntax-fd47b4ce32ccc633.rmeta -C incremental=/tmp/.tmp9ZT37p/incremental-state -Wclippy::all -Zthreads=1 -Adeprecated -Aunknown-lints -Zincremental-verify-ich (PID 294825, part 1) Events recorded: Ir Events shown: Ir Event sort order: Ir Thresholds: 99 Include dirs: User annotated: Auto-annotation: on -------------------------------------------------------------------------------- Ir -------------------------------------------------------------------------------- 3,632,249,968 (100.0%) PROGRAM TOTALS -------------------------------------------------------------------------------- Ir file:function -------------------------------------------------------------------------------- 133,314,534 ( 3.67%) ???:::try_mark_previous_green'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 124,146,930 ( 3.42%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 54,989,038 ( 1.51%) ???:0x0000000000173dc0 [/usr/lib/libc.so.6] 54,986,221 ( 1.51%) ???:::render [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 53,830,123 ( 1.48%) ???:::try_mark_previous_green [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 53,694,144 ( 1.48%) 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] 49,514,406 ( 1.36%) ???:::advance_token [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,933,971 ( 1.32%) ???:rustc_interface::callbacks::track_span_parent [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,859,891 ( 1.18%) ???:core::fmt::write [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,319,840 ( 1.05%) ???:::resolve_ident_in_scope_set_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,738,877 ( 1.04%) ???:::next_token_from_cursor [???] 36,143,133 ( 1.00%) ???:)>>::call_once [???] 35,412,771 ( 0.97%) ???:>::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] 34,637,622 ( 0.95%) ???:::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,774,048 ( 0.93%) ???:::short_write_process_buffer::<8> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,389,487 ( 0.92%) ???:core::slice::memchr::memchr_aligned [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,200,060 ( 0.89%) ???:::putc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,132,365 ( 0.80%) ???:::stable_hash_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,573,946 ( 0.76%) ???:::traits_in_scope [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,869,543 ( 0.71%) ???:::lower_qpath [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,403,904 ( 0.70%) ???:md5::compress::soft::compress [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,226,000 ( 0.69%) ???:::next_match [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,028,059 ( 0.69%) ???:::encode_def_ids'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,732,547 ( 0.65%) ???:::resolve_path [???] 22,890,527 ( 0.63%) ???:::parent_hir_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,645,629 ( 0.62%) ???:::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] 22,362,075 ( 0.62%) ???:::overlaps [???] 20,080,141 ( 0.55%) ???:::to [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,474,384 ( 0.54%) ???:::split_at [???] 19,357,301 ( 0.53%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,249,595 ( 0.53%) ???:<&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] 19,248,201 ( 0.53%) ???:::lookup_char_pos [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,968,685 ( 0.52%) ???:::lint_level_spec_at_node'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,541,824 ( 0.51%) include/jemalloc/internal/rtree.h:free 18,308,644 ( 0.50%) ???:rustc_resolve::rustdoc::source_span_for_markdown_range_inner [???] 18,140,141 ( 0.50%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,836,004 ( 0.49%) ???: 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] 16,997,047 ( 0.47%) ???:::hash_owner_nodes::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,877,864 ( 0.46%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 16,280,061 ( 0.45%) ???:::write_char [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 15,568,294 ( 0.43%) ???: 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] 15,346,986 ( 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] 14,649,002 ( 0.40%) ???:::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,680,491 ( 0.38%) 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,653,020 ( 0.38%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,545,646 ( 0.37%) ???:::lower_expr_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,345,271 ( 0.37%) ???:::parse_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 13,327,289 ( 0.37%) ???:::parse_line [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,989,093 ( 0.36%) ???: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,916,742 ( 0.36%) ???:::slice_write_process_buffer [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,805,317 ( 0.35%) ???: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] 12,694,061 ( 0.35%) ???:::lex_token_trees'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,421,053 ( 0.34%) ???:rustc_resolve::rustdoc::unindent_doc_fragments [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 12,043,316 ( 0.33%) ???:::bump_minimal [???] 11,828,435 ( 0.33%) ???:::smart_resolve_path_fragment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,786,113 ( 0.32%) ???:>::push [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,770,898 ( 0.32%) ???: as rustc_ast::visit::Visitor>::visit_expr'2 [???] 11,393,156 ( 0.31%) ???:annotate_snippets::renderer::render::normalize_whitespace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,197,331 ( 0.31%) ???:::create_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 11,058,946 ( 0.30%) ???:::ensure_lines [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,861,027 ( 0.30%) /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 10,817,817 ( 0.30%) include/jemalloc/internal/jemalloc_internal_inlines_c.h:malloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 10,713,610 ( 0.29%) ???:::hir_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,430,386 ( 0.29%) ???:::take [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,299,666 ( 0.28%) ???:::in_external_macro [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,268,470 ( 0.28%) ???: as rustc_ast::visit::Visitor>::visit_id [???] 10,182,618 ( 0.28%) ???:::exec_cache_promotions'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 10,045,112 ( 0.28%) ???:::encode_crate_root'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,836,919 ( 0.27%) ???:::make_owner_info [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,772,710 ( 0.27%) ???:0x00000000001747c0 [/usr/lib/libc.so.6] 9,660,954 ( 0.27%) ???:::hir_body_const_context [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,533,246 ( 0.26%) ???:::hir_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,492,032 ( 0.26%) ???:::encode_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,437,895 ( 0.26%) ???:>::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 9,193,134 ( 0.25%) ???:rustc_query_impl::execution::try_execute_query::>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,945,426 ( 0.25%) ???:::parse_path_segment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,854,486 ( 0.24%) ???:rustc_query_impl::plumbing::encode_query_values_inner::, rustc_middle::dep_graph::graph::DepNodeIndex>, &rustc_middle::ty::typeck_results::TypeckResults>::{closure#0} [???] 8,782,061 ( 0.24%) ???:::fully_expand_fragment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,525,419 ( 0.23%) ???:::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] 8,388,994 ( 0.23%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,349,974 ( 0.23%) ???:::finish128_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,218,774 ( 0.23%) ???:::desugaring_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,163,796 ( 0.22%) ???:::lint_level_spec_at_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 8,124,483 ( 0.22%) ???:::hir_attrs'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,832,139 ( 0.22%) ???:::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] 7,652,470 ( 0.21%) include/jemalloc/internal/cache_bin.h:malloc 7,612,639 ( 0.21%) ???:::intern_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,589,059 ( 0.21%) include/jemalloc/internal/rtree.h:tcache_bin_flush_small 7,578,032 ( 0.21%) ???:::alloc_and_color_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,364,116 ( 0.20%) ???:::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] 7,163,567 ( 0.20%) ???:::decode_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 7,126,913 ( 0.20%) ???:> 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,105,366 ( 0.20%) ???: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] 7,093,117 ( 0.20%) ???:::append [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,991,908 ( 0.19%) ???:::short_write_process_buffer::<4> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,918,614 ( 0.19%) ???: as rustc_data_structures::stable_hash::StableHash>::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,796,561 ( 0.19%) ???: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,588,648 ( 0.18%) ???: as rustc_serialize::serialize::Decodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,561,156 ( 0.18%) ???:::encode_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,503,679 ( 0.18%) include/jemalloc/internal/cache_bin.h:free 6,462,240 ( 0.18%) ???:::lookup_line [???] 6,447,120 ( 0.18%) ???:core::ptr::drop_glue::> [???] 6,384,769 ( 0.18%) ???:rustc_ast_lowering::lower_to_hir [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,233,586 ( 0.17%) ???:::parse_item_kind'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 6,201,644 ( 0.17%) /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] 6,116,582 ( 0.17%) ???:::check_expr [???] 6,046,449 ( 0.17%) ???: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,727,386 ( 0.16%) 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] 5,687,856 ( 0.16%) include/jemalloc/internal/sz.h:realloc 5,524,400 ( 0.15%) ???:::next'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,520,399 ( 0.15%) ???: 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] 5,507,230 ( 0.15%) ???:::hir_body_owner_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,429,582 ( 0.15%) ???: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,426,584 ( 0.15%) ???:::span_data_to_lines_and_cols [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,404,905 ( 0.15%) include/jemalloc/internal/sz.h:malloc 5,349,785 ( 0.15%) ???: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] 5,347,168 ( 0.15%) ???:::lookup_source_file [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,323,887 ( 0.15%) ???:::lower_attrs_vec [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,195,183 ( 0.14%) ???:::short_write_process_buffer::<1> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,188,934 ( 0.14%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,134,522 ( 0.14%) ???:::parse_path_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,124,638 ( 0.14%) ???: 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] 5,107,424 ( 0.14%) ???:::get_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,045,461 ( 0.14%) ???:::write_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,040,981 ( 0.14%) /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] 5,014,252 ( 0.14%) ???:::resolve_and_cache_rustdoc_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,007,891 ( 0.14%) ???:0x0000000000173660 [/usr/lib/libc.so.6] 5,003,272 ( 0.14%) ???:::decode_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 5,002,139 ( 0.14%) ???:<[(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] 4,995,223 ( 0.14%) ???:::fmt_to [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,990,397 ( 0.14%) ???:::hir_enclosing_body_owner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,989,613 ( 0.14%) ???:::resolve_pattern_inner::{closure#0} [???] 4,940,047 ( 0.14%) ???: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] 4,890,882 ( 0.13%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,829,310 ( 0.13%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,794,955 ( 0.13%) ???: as rustc_hir::intravisit::Visitor>::visit_expr'2 [???] 4,784,744 ( 0.13%) ???:<&char as core::fmt::Display>::fmt [???] 4,693,112 ( 0.13%) ???:>::get_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,637,901 ( 0.13%) ???:::resolve_doc_links [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,627,410 ( 0.13%) ???: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] 4,605,955 ( 0.13%) src/arena.c:malloc_default 4,587,004 ( 0.13%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,484,935 ( 0.12%) ???:::resolve_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,416,702 ( 0.12%) ???:>::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] 4,379,203 ( 0.12%) ???:::hash_expn:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,376,645 ( 0.12%) ???:>::call_once'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,339,424 ( 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] 4,309,060 ( 0.12%) /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:: 4,306,247 ( 0.12%) ???:::parse_item_impl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,171,063 ( 0.11%) ???: as rustc_hir::intravisit::Visitor>::visit_expr::{closure#0}::{closure#0}'2 [???] 4,123,562 ( 0.11%) ???:annotate_snippets::renderer::render::draw_line [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 4,067,764 ( 0.11%) ???:>>::walk_ref [???] 4,025,207 ( 0.11%) ???:::span_to_snippet [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,918,535 ( 0.11%) /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] 3,901,601 ( 0.11%) src/arena.c:realloc 3,887,060 ( 0.11%) ???:::expr_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,836,763 ( 0.11%) /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 3,836,394 ( 0.11%) ???:::mark_live_symbols'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,807,496 ( 0.10%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 3,795,253 ( 0.10%) ???:>>::walk_ref'2 [???] 3,770,124 ( 0.10%) ???:::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] 3,761,946 ( 0.10%) ???:annotate_snippets::renderer::render::char_width [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,752,200 ( 0.10%) ???:::is_imported [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,745,337 ( 0.10%) 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] 3,717,814 ( 0.10%) ???:>::add_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,708,687 ( 0.10%) ???:::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] 3,701,041 ( 0.10%) ???:annotate_snippets::renderer::render::render'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,693,594 ( 0.10%) ???:::decode_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,691,566 ( 0.10%) ???:rustc_resolve::rustdoc::add_doc_fragment [???] 3,648,659 ( 0.10%) ???:::candidate_from_obligation_no_cache [???] 3,642,530 ( 0.10%) ???:::lookup_byte_offset [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,476,887 ( 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] 3,469,810 ( 0.10%) ???:::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,459,795 ( 0.10%) 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,453,209 ( 0.10%) ???:::resolve_path_with_ribs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,444,674 ( 0.09%) ???:rustc_hir::intravisit::walk_expr::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,441,488 ( 0.09%) ???:0x000000000000fb40 [/usr/lib/ld-linux-x86-64.so.2] 3,436,650 ( 0.09%) ???:stacker::remaining_stack [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,424,099 ( 0.09%) ???:::qpath_res [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,396,103 ( 0.09%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,372,228 ( 0.09%) ???: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] 3,294,452 ( 0.09%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,267,872 ( 0.09%) ???: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] 3,266,715 ( 0.09%) ???: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] 3,247,774 ( 0.09%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,226,253 ( 0.09%) ???: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] 3,218,590 ( 0.09%) include/jemalloc/internal/thread_event.h:malloc 3,173,675 ( 0.09%) ???:rustc_ast::util::comments::beautify_doc_string [???] 3,164,430 ( 0.09%) ???:::is_diagnostic_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,154,544 ( 0.09%) include/jemalloc/internal/emap.h:tcache_bin_flush_small 3,112,884 ( 0.09%) 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,085,369 ( 0.08%) ???:::lower_path_segment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,056,430 ( 0.08%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 3,056,256 ( 0.08%) ???:::lower_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 3,030,903 ( 0.08%) ???: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] 3,012,116 ( 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] 3,010,162 ( 0.08%) ???:::lint_level_spec_at_node [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,989,775 ( 0.08%) ???:::visit_fn [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,963,033 ( 0.08%) ???:::intern [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,917,698 ( 0.08%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,915,998 ( 0.08%) ???: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] 2,909,558 ( 0.08%) ???:::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,896,684 ( 0.08%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,888,350 ( 0.08%) include/jemalloc/internal/edata.h:tcache_bin_flush_small 2,885,539 ( 0.08%) ???:::get_diagnostic_name [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,869,923 ( 0.08%) ???:rustc_span::normalize_src [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,868,975 ( 0.08%) ???:> as rustc_middle::query::caches::QueryCache>::for_each'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,801,027 ( 0.08%) 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] 2,763,332 ( 0.08%) /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] 2,733,248 ( 0.08%) ???:::opt_associated_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,725,231 ( 0.08%) ???:annotate_snippets::renderer::render::render [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,717,497 ( 0.07%) ???:::extract_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,717,385 ( 0.07%) ???:::lower_pat_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,702,928 ( 0.07%) ???:::is_diagnostic_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,679,365 ( 0.07%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,678,208 ( 0.07%) ???:::parse_token_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,647,639 ( 0.07%) include/jemalloc/internal/rtree.h:realloc 2,610,069 ( 0.07%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,553,172 ( 0.07%) ???:::check_ident [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,534,606 ( 0.07%) ???:pthread_mutex_unlock [/usr/lib/libc.so.6] 2,521,738 ( 0.07%) ???: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,519,408 ( 0.07%) ???:> 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,506,269 ( 0.07%) ???:::intern_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,495,422 ( 0.07%) 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,446,900 ( 0.07%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,389,015 ( 0.07%) ???:::lower [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,348,113 ( 0.06%) ???:::evaluate_trait_predicate_recursively'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,321,323 ( 0.06%) ???: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] 2,296,537 ( 0.06%) ???:::parse_fn_params [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,287,115 ( 0.06%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:clippy_lints::doc::doc_suspicious_footnotes::check 2,279,968 ( 0.06%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,277,912 ( 0.06%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,271,108 ( 0.06%) ???:::parse_stmt_without_recovery [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,268,280 ( 0.06%) ???:>::reserve_rehash::>::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,265,829 ( 0.06%) ???:::expect_hir_owner_nodes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,258,926 ( 0.06%) ???: 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] 2,222,762 ( 0.06%) ???:::is_conditionally_const:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,217,657 ( 0.06%) ???:>>::drop_slow'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,214,561 ( 0.06%) ???:::resolve_macro_invocation [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,208,424 ( 0.06%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,196,844 ( 0.06%) ???:pthread_mutex_trylock [/usr/lib/libc.so.6] 2,183,228 ( 0.06%) ???:::candidate_from_obligation [???] 2,178,544 ( 0.06%) include/jemalloc/internal/sz.h:free 2,170,803 ( 0.06%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,167,778 ( 0.06%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,157,958 ( 0.06%) ???:::get_line [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,157,169 ( 0.06%) ???:::range_span [???] 2,133,699 ( 0.06%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:clippy_utils::macros::root_macro_call 2,133,669 ( 0.06%) ???:::def_key [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,133,009 ( 0.06%) ???:::pad [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,130,950 ( 0.06%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,129,525 ( 0.06%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,088,431 ( 0.06%) ???:alloc::fmt::format::format_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,083,455 ( 0.06%) 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,067,875 ( 0.06%) ???:rustc_passes::dead::live_symbols_and_ignored_derived_traits'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,066,494 ( 0.06%) ???:::parse_ty_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,062,144 ( 0.06%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,051,211 ( 0.06%) ???: as rustc_hir::intravisit::Visitor>::visit_path [???] 2,039,050 ( 0.06%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::root_macro_call [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 2,038,250 ( 0.06%) 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,028,486 ( 0.06%) 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,028,040 ( 0.06%) 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] 2,017,887 ( 0.06%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,017,617 ( 0.06%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:clippy_utils::in_automatically_derived 2,016,793 ( 0.06%) 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,014,300 ( 0.06%) 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,012,463 ( 0.06%) ???:::bump [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,007,689 ( 0.06%) ???:::get_lint_level_spec [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 2,000,579 ( 0.06%) ???: as core::clone::Clone>::clone::clone_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,986,670 ( 0.05%) include/jemalloc/internal/arena_inlines_b.h:tcache_bin_flush_small 1,985,242 ( 0.05%) ???:rustc_data_structures::unord::hash_iter_order_independent::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,982,067 ( 0.05%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,980,658 ( 0.05%) ???:::confirm_auto_impl_candidate::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,972,907 ( 0.05%) ???:::visit_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,962,843 ( 0.05%) ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,947,521 ( 0.05%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,942,258 ( 0.05%) ???:::get_diagnostic_name'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,942,211 ( 0.05%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,941,577 ( 0.05%) ???:::check_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,935,630 ( 0.05%) ???:::expn_data [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,929,203 ( 0.05%) ???:::decode_symbol [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,923,929 ( 0.05%) ???:::lower_method_sig [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,915,351 ( 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] 1,908,248 ( 0.05%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,905,361 ( 0.05%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,875,879 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/strings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,875,516 ( 0.05%) ???:::type_dependent_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,868,458 ( 0.05%) ???: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,848,039 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/byte_char_slices.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,837,990 ( 0.05%) ???:>::new'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,817,314 ( 0.05%) ???:::is_path_start_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,802,835 ( 0.05%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,801,289 ( 0.05%) ???: 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] 1,762,485 ( 0.05%) ???:rustc_ast::visit::walk_item_inner::> [???] 1,762,410 ( 0.05%) ???:>::decode'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,759,954 ( 0.05%) ???:::lower_expr_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,754,611 ( 0.05%) 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,750,628 ( 0.05%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,736,422 ( 0.05%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,734,116 ( 0.05%) 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,727,736 ( 0.05%) ???:::lower_qpath'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,714,527 ( 0.05%) 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,703,207 ( 0.05%) ???:core::str::converts::from_utf8 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,690,576 ( 0.05%) ???:0x000000000000ba80 [/usr/lib/ld-linux-x86-64.so.2] 1,687,533 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,677,477 ( 0.05%) site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,673,848 ( 0.05%) ???:> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,659,888 ( 0.05%) ???:rustc_passes::reachable::reachable_set'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,648,082 ( 0.05%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,643,041 ( 0.05%) ???:::lower_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,640,824 ( 0.05%) 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,640,085 ( 0.05%) ???: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,629,925 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/regex.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,629,701 ( 0.04%) ???:::parse_outer_attributes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,624,193 ( 0.04%) ???:::typeck_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,624,004 ( 0.04%) include/jemalloc/internal/thread_event.h:realloc 1,620,136 ( 0.04%) ???:::parse_stmt_without_recovery'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,619,986 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,616,799 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/useless_conversion.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,616,117 ( 0.04%) ???:core::ptr::drop_glue::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,615,999 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/legacy_numeric_constants.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,599,784 ( 0.04%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,599,576 ( 0.04%) ???:::path_matches [???] 1,590,265 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/manual_option_as_slice.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,587,540 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,581,434 ( 0.04%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,579,408 ( 0.04%) ???:pulldown_cmark::parse::item_to_event [???] 1,566,926 ( 0.04%) ???:::advance_token'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,552,690 ( 0.04%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,544,748 ( 0.04%) ???:::span_to_locations [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,541,766 ( 0.04%) ???:::is_exported [???] 1,540,819 ( 0.04%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,539,054 ( 0.04%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,536,519 ( 0.04%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,534,540 ( 0.04%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::parse_attrs::<::pop_attrs::{closure#0}, rustc_hir::hir::Attribute> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,534,540 ( 0.04%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::parse_attrs::<::push_attrs::{closure#0}, rustc_hir::hir::Attribute> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,530,482 ( 0.04%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:::check_attributes 1,529,634 ( 0.04%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,520,582 ( 0.04%) ???:std::path::compare_components [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,519,743 ( 0.04%) ???: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,519,247 ( 0.04%) include/jemalloc/internal/arena_inlines_b.h:realloc 1,518,340 ( 0.04%) ???:> 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,508,564 ( 0.04%) include/jemalloc/internal/bitmap.h:tcache_bin_flush_small 1,505,756 ( 0.04%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,504,522 ( 0.04%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,503,598 ( 0.04%) ???:>::get_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,492,132 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/if_let_mutex.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,491,918 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/format.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,491,504 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_expr_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,481,282 ( 0.04%) ???:::encode_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,474,960 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/manual_is_ascii_check.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,474,256 ( 0.04%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs: as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find_map::check<(rustc_span::hygiene::ExpnId, rustc_span::hygiene::ExpnData), clippy_utils::macros::MacroCall, &mut clippy_utils::macros::macro_backtrace::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,471,867 ( 0.04%) ???:rustc_ty_utils::ty::param_env [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,471,281 ( 0.04%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,471,080 ( 0.04%) 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,469,440 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/needless_nonzero_get.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,467,420 ( 0.04%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes 1,461,045 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/len_zero.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,459,848 ( 0.04%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,459,681 ( 0.04%) ???: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] 1,456,122 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/manual_clamp.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,452,027 ( 0.04%) ???:::hir_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,448,896 ( 0.04%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,448,077 ( 0.04%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<(rustc_span::span_encoding::Span, alloc::string::String), core::iter::adapters::filter_map::FilterMap, clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0}>>>::from_iter [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,448,077 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/doc/suspicious_doc_comments.rs:clippy_lints::doc::suspicious_doc_comments::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,447,571 ( 0.04%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,447,571 ( 0.04%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,447,313 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/non_copy_const.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,447,121 ( 0.04%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,445,302 ( 0.04%) ???: as rustc_ast::visit::Visitor>::visit_expr [???] 1,442,073 ( 0.04%) ???:::lang_items [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,438,568 ( 0.04%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,438,019 ( 0.04%) ???:::parse_ty_common'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,433,497 ( 0.04%) ???:::parse_pat_with_range_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,432,999 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/ifs/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,432,624 ( 0.04%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,432,400 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/redundant_slicing.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,432,332 ( 0.04%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 1,432,094 ( 0.04%) ???:<[rustc_hir::hir::PathSegment] as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,431,601 ( 0.04%) ???:::mark_span_with_reason [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,419,270 ( 0.04%) 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,411,787 ( 0.04%) ???:::def_id_partial_cmp [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,402,157 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/redundant_closure_call.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,400,099 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/bit_width.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,396,092 ( 0.04%) /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] 1,394,049 ( 0.04%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,394,049 ( 0.04%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes_post 1,391,843 ( 0.04%) include/jemalloc/internal/tcache_inlines.h:realloc 1,391,441 ( 0.04%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,388,354 ( 0.04%) 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,387,210 ( 0.04%) 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,384,292 ( 0.04%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,384,167 ( 0.04%) ???:::from_token_lit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,376,621 ( 0.04%) ???:::parse_block_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,372,126 ( 0.04%) ???:::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,370,074 ( 0.04%) ???: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] 1,368,288 ( 0.04%) 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,360,030 ( 0.04%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,359,550 ( 0.04%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,358,648 ( 0.04%) ???:rustc_ast::mut_visit::walk_fn:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,353,728 ( 0.04%) 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,350,471 ( 0.04%) include/jemalloc/internal/ph.h:pa_alloc 1,343,417 ( 0.04%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, &rustc_middle::ty::generics::Generics>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,336,620 ( 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] 1,335,662 ( 0.04%) include/jemalloc/internal/bit_util.h:malloc_default 1,334,160 ( 0.04%) ???:::emit_messages_default'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,333,463 ( 0.04%) ???:rustc_middle::ty::trait_def::trait_impls_of_provider [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,331,814 ( 0.04%) ???: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] 1,327,762 ( 0.04%) 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,327,664 ( 0.04%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::in_automatically_derived [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,326,150 ( 0.04%) ???: as rustc_hir::intravisit::Visitor>::visit_nested_item'2 [???] 1,318,784 ( 0.04%) 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,318,701 ( 0.04%) 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] 1,310,518 ( 0.04%) 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,310,518 ( 0.04%) 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,309,526 ( 0.04%) ???:::resolve_crate::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,308,945 ( 0.04%) 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,306,732 ( 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] 1,306,158 ( 0.04%) 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,300,801 ( 0.04%) ???: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] 1,298,906 ( 0.04%) include/jemalloc/internal/rtree.h:pa_alloc 1,295,171 ( 0.04%) ???:::fallible_with_capacity:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,288,918 ( 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] 1,286,897 ( 0.04%) ???:getenv [/usr/lib/libc.so.6] 1,283,732 ( 0.04%) ???:::visit_generic_params [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,281,736 ( 0.04%) 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,277,923 ( 0.04%) ???:::is_desugaring [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,272,145 ( 0.04%) ???:::check_impl_or_impl_item_live [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,270,196 ( 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] 1,268,238 ( 0.03%) ???:::parse_expr_assoc_with'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,263,837 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/partialeq_to_none.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,261,783 ( 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] 1,261,135 ( 0.03%) ???:rustc_hir::intravisit::walk_ty:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,260,050 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/strlen_on_c_strings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,249,404 ( 0.03%) /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> 1,243,377 ( 0.03%) ???: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,238,151 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/nonnull_unchecked_on_box_ptr.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,237,813 ( 0.03%) ???: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] 1,236,026 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/zombie_processes.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,235,074 ( 0.03%) ???:::intern_predicate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,230,343 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/size_of_in_element_count.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,229,212 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/format_impl.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,229,165 ( 0.03%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_attributes 1,229,165 ( 0.03%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_attributes_post 1,228,023 ( 0.03%) ???:::fmt [???] 1,227,658 ( 0.03%) include/jemalloc/internal/cache_bin.h:realloc 1,225,485 ( 0.03%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,225,261 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/unit_return_expecting_ord.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,222,696 ( 0.03%) ???:::parse_fn [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,222,189 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/formatting.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,214,375 ( 0.03%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,213,792 ( 0.03%) ???:::intern_region [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,211,936 ( 0.03%) ???:::lifetime_res_to_generic_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,211,488 ( 0.03%) ???: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] 1,208,520 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::matching_root_macro_call [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,204,498 ( 0.03%) 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,204,238 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_pop_if.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,203,154 ( 0.03%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,200,241 ( 0.03%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,196,329 ( 0.03%) ???:rustc_hir::hir::is_range_literal [???] 1,195,077 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/unnecessary_map_on_constructor.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,194,160 ( 0.03%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,188,693 ( 0.03%) ???:::def_path_hash [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,186,634 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/single_range_in_vec_init.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,184,626 ( 0.03%) ???:::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,182,879 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/needless_bool.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,181,895 ( 0.03%) ???:::write_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,181,567 ( 0.03%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,180,016 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_different_sizes.rs:clippy_lints::casts::cast_slice_different_sizes::expr_cast_chain_tys [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,177,211 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/default.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,171,540 ( 0.03%) ???:::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] 1,169,370 ( 0.03%) ???:::trait_of_assoc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,168,513 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/format_args.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,168,041 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,165,918 ( 0.03%) ???:> 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,164,568 ( 0.03%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,151,022 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/needless_borrows_for_generic_args.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,147,912 ( 0.03%) ???: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] 1,147,347 ( 0.03%) ???:::qpath_res [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,144,340 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/drop_forget_ref.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,143,632 ( 0.03%) ???:::confirm_candidate [???] 1,141,498 ( 0.03%) ???:::alloc_and_color_node'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,139,916 ( 0.03%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::::check::{closure#0}>>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,137,597 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/write/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,135,160 ( 0.03%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,134,492 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/blocks_in_conditions.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,133,590 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/transmute/mod.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,133,506 ( 0.03%) ???:::parse_item_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,133,454 ( 0.03%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,133,125 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/swap_ptr_to_ref.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,131,986 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_ignore_case_cmp.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,131,423 ( 0.03%) include/jemalloc/internal/div.h:tcache_bin_flush_small 1,129,824 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/block_scrutinee.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,129,788 ( 0.03%) ???:::parse_item_common'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,128,498 ( 0.03%) ???:::{closure#1} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_middle::dep_graph::dep_node::DepNode, rustc_middle::dep_graph::serialized::SerializedDepNodeIndex, rustc_middle::dep_graph::graph::DepNodeIndex)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,128,424 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/assertions_on_constants.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,127,180 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/useless_concat.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,127,055 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/entry.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,126,519 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/reserve_after_initialization.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,123,617 ( 0.03%) ???:::record_use [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,123,568 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_take.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,122,317 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/implicit_saturating_sub.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,121,236 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::check_attributes 1,121,236 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::check_attributes_post 1,120,949 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_abs_diff.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,120,462 ( 0.03%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:, clippy_utils::macros::first_node_macro_backtrace::{closure#0}> as core::iter::traits::iterator::Iterator>::try_fold::<(), >::iter_try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, as core::iter::traits::iterator::Iterator>::try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,120,385 ( 0.03%) ???:rustc_privacy::effective_visibilities'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,119,465 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/await_holding_invalid.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,119,193 ( 0.03%) ???:::visit_expr::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,119,037 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/zero_repeat_side_effects.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,117,149 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id_with_node_args [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,110,046 ( 0.03%) ???:::mk_type_list [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,109,590 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/raw_strings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,106,688 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/double_parens.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,102,324 ( 0.03%) ???:::lower_item_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,101,192 ( 0.03%) ???: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,100,565 ( 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] 1,098,247 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/indexing_slicing.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,096,758 ( 0.03%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,095,523 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/arc_with_non_send_sync.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,094,364 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/box_default.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,093,549 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/from_raw_with_void_ptr.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,090,785 ( 0.03%) include/jemalloc/internal/tsd_tls.h:free [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,090,784 ( 0.03%) include/jemalloc/internal/atomic.h:free 1,090,318 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_from_raw_parts.rs:clippy_lints::casts::cast_slice_from_raw_parts::check_implicit_cast [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,089,718 ( 0.03%) ???:> 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,087,789 ( 0.03%) ???:0x000000000000aec0 [/usr/lib/ld-linux-x86-64.so.2] 1,082,333 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/default_constructed_unit_structs.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,081,584 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/collapsible_if.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,080,712 ( 0.03%) ???: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] 1,080,648 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/mem_replace.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,079,342 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/explicit_write.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,078,550 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/default_instead_of_iter_empty.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,077,513 ( 0.03%) ???:::prepend [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,077,462 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/to_digit_is_some.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,077,158 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/strings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,077,036 ( 0.03%) ???:::new_named_lifetime [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,076,303 ( 0.03%) /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,076,039 ( 0.03%) ???:::parse_block_common'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,075,092 ( 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] 1,073,979 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/unnecessary_owned_empty_strings.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,073,413 ( 0.03%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:::next_match 1,072,751 ( 0.03%) 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,072,471 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/from_str_radix_10.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,070,476 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/panicking_overflow_checks.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,070,342 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/implicit_saturating_add.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,069,079 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_checked_ops.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,068,216 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_rotate.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,068,127 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/cloned_ref_to_slice_refs.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,068,022 ( 0.03%) ???:rustc_ast::visit::visit_stmts::> [???] 1,067,872 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/bool_assert_comparison.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,066,970 ( 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] 1,065,889 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/replace_box.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,065,209 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/float_literal.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,065,043 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_bits.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,064,792 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_float_methods.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,061,310 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/rc_clone_in_vec_init.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,061,028 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_slice_size_calculation.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,060,651 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/precedence.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,059,926 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/neg_cmp_op_on_partial_ord.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,059,882 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,058,250 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/manual_rem_euclid.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,057,319 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/async_yields_async.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,057,028 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/operators/float_cmp.rs:clippy_lints::operators::float_cmp::check_assert [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,056,628 ( 0.03%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/jemalloc.c:malloc 1,056,495 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/minmax.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,056,460 ( 0.03%) ???:::resolve_ident_in_lexical_scope [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,052,396 ( 0.03%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,049,302 ( 0.03%) ???:::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,048,304 ( 0.03%) ???:::visit_expr::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,041,147 ( 0.03%) ???: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] 1,033,975 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_path [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,033,694 ( 0.03%) ???:rustc_resolve::rustdoc::span_of_fragments [???] 1,032,814 ( 0.03%) ???:::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] 1,031,475 ( 0.03%) ???:::lower_stmts [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,026,910 ( 0.03%) ???:::visit_nested_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,023,217 ( 0.03%) ???:::parse_item_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,019,156 ( 0.03%) site/frontend/rust-clippy/clippy_utils/src/macros.rs: as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find_map::check<(rustc_span::hygiene::ExpnId, rustc_span::hygiene::ExpnData), clippy_utils::macros::MacroCall, &mut clippy_utils::macros::macro_backtrace::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 1,017,438 ( 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] 1,009,970 ( 0.03%) ???:::typeck_body'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,008,810 ( 0.03%) 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] 1,007,206 ( 0.03%) 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,006,298 ( 0.03%) ???:rust_psm_stack_pointer [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 1,005,263 ( 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] 1,003,882 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/init_numbered_fields.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 1,003,466 ( 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] 1,001,502 ( 0.03%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 999,038 ( 0.03%) 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] 997,509 ( 0.03%) ???:rustc_resolve::rustdoc::parse_links [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 996,171 ( 0.03%) ???:::visit_expr'2 [???] 993,474 ( 0.03%) ???:::def_path_hash [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 992,311 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::if_statement_binops [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 990,715 ( 0.03%) ???:::serialize::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 987,756 ( 0.03%) ???:>>,)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 986,322 ( 0.03%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 980,996 ( 0.03%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 980,885 ( 0.03%) ???: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] 980,145 ( 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] 977,642 ( 0.03%) 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] 975,240 ( 0.03%) ???: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] 973,087 ( 0.03%) ???:::evaluate_trait_predicate_recursively [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 972,075 ( 0.03%) 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] 971,203 ( 0.03%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::implementations_of_trait [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 969,540 ( 0.03%) include/jemalloc/internal/edata.h:pa_alloc 965,263 ( 0.03%) ???: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] 962,177 ( 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] 956,787 ( 0.03%) 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] 953,823 ( 0.03%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_attributes_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 953,045 ( 0.03%) ???:::create_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 952,603 ( 0.03%) ???:::lower_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 952,220 ( 0.03%) 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] 951,490 ( 0.03%) include/jemalloc/internal/sz.h:pa_alloc 950,548 ( 0.03%) ???:::resolve_imports [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 949,484 ( 0.03%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/visit.rs:>::walk_ref'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 946,327 ( 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] 945,785 ( 0.03%) /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 944,624 ( 0.03%) ???:::visit_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 944,607 ( 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] 944,005 ( 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] 943,999 ( 0.03%) /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] 940,769 ( 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] 936,723 ( 0.03%) ???:::flat_map_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 934,313 ( 0.03%) ???:0x0000000000177c20 [/usr/lib/libc.so.6] 934,232 ( 0.03%) 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] 932,922 ( 0.03%) ???:::visit_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 932,597 ( 0.03%) ???:>>::walk_ref [???] 929,335 ( 0.03%) ???:::new'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 929,222 ( 0.03%) ???:::resolve_anonymous_lifetime [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 926,282 ( 0.03%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 924,993 ( 0.03%) ???:__rustc::__rust_alloc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 924,966 ( 0.03%) ???:::alloc_ctxt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 924,355 ( 0.03%) 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] 918,755 ( 0.03%) ???:>>::walk_ref [???] 914,161 ( 0.03%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 909,973 ( 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] 909,471 ( 0.03%) ???: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] 909,200 ( 0.03%) 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] 906,939 ( 0.02%) ???: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] 902,848 ( 0.02%) ???:core::str::count::do_count_chars [???] 902,752 ( 0.02%) ???:::flat_map_stmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 900,448 ( 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] 900,437 ( 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] 899,944 ( 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] 893,078 ( 0.02%) ???:::feed_visibility [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 892,924 ( 0.02%) ???:::lower_stmts'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 890,949 ( 0.02%) ???:::parse_expr_prefix'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 890,817 ( 0.02%) ???:::lex_token_trees [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 882,573 ( 0.02%) ???:::mk_bound_variable_kinds [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 874,999 ( 0.02%) include/jemalloc/internal/ph.h:tcache_bin_flush_small 873,160 ( 0.02%) ???:>>::walk_ref [???] 873,069 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 872,297 ( 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] 868,903 ( 0.02%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 867,758 ( 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] 867,636 ( 0.02%) ???: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] 858,274 ( 0.02%) ???:::parse_dot_suffix_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 853,252 ( 0.02%) src/base.c:pa_alloc 851,810 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:clippy_lints::doc::suspicious_doc_comments::check 851,081 ( 0.02%) ???:::path_all [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 850,263 ( 0.02%) ???:::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 849,549 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_lints::doc::doc_suspicious_footnotes::check 849,222 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 844,422 ( 0.02%) include/jemalloc/internal/cache_bin.h:malloc_default 841,265 ( 0.02%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 834,321 ( 0.02%) ???:::check_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 831,179 ( 0.02%) ???:::visit_fn [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 828,817 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs:clippy_lints::casts::cast_ptr_alignment::check_cast_method [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 828,445 ( 0.02%) ???:::hir_maybe_body_owned_by [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 825,416 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/attr/version.rs:::meets 822,445 ( 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] 816,829 ( 0.02%) ???:>, 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] 815,869 ( 0.02%) ???: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] 814,300 ( 0.02%) ???:::visit_ast_fragment_with_placeholders [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 810,348 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/manual_retain.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 809,878 ( 0.02%) 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] 808,423 ( 0.02%) ???: 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] 807,628 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/validations.rs:::trim_start_matches::<::is_whitespace> 807,333 ( 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] 807,229 ( 0.02%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 803,424 ( 0.02%) ???:::lower_node_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 803,384 ( 0.02%) ???:::parse_expr_paren_seq [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 801,765 ( 0.02%) ???:::resolve_crate_root [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 801,059 ( 0.02%) ???:::par_hir_body_owners::::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 800,755 ( 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] 797,511 ( 0.02%) ???:<(&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] 796,909 ( 0.02%) ???:>>::walk_ref [???] 793,073 ( 0.02%) ???: as rustc_ast::visit::Visitor>::visit_stmt::{closure#0} [???] 787,635 ( 0.02%) ???:::parse_pat_ident [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 783,588 ( 0.02%) ???: as rustc_ast::visit::Visitor>::visit_pat [???] 782,842 ( 0.02%) ???:::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 780,794 ( 0.02%) ???:::{closure#1} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_middle::dep_graph::dep_node::DepNode, rustc_middle::dep_graph::serialized::SerializedDepNodeIndex, rustc_middle::dep_graph::graph::DepNodeIndex)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 780,416 ( 0.02%) ???:::flat_map_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 778,958 ( 0.02%) 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] 776,274 ( 0.02%) ???: as rustc_type_ir::fold::TypeFolder>::fold_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 775,624 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 775,624 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::check_attributes_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 773,742 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 771,947 ( 0.02%) ???:>::get_attrs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 771,213 ( 0.02%) ???:::update_decl_chain [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 771,075 ( 0.02%) ???: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] 769,466 ( 0.02%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 767,191 ( 0.02%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 766,629 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_attributes_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 765,267 ( 0.02%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 764,741 ( 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] 761,451 ( 0.02%) ???:::to_attr_token_stream [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 760,483 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::emit_lint_if_under_msrv [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 758,832 ( 0.02%) ???:pulldown_cmark::linklabel::scan_link_label_rest [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 757,819 ( 0.02%) ???: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] 756,555 ( 0.02%) 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] 756,253 ( 0.02%) /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 755,626 ( 0.02%) ???:::hir_span_with_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 754,282 ( 0.02%) include/jemalloc/internal/util.h:tcache_bin_flush_small 752,872 ( 0.02%) ???: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] 751,480 ( 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] 750,764 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/int_plus_one.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 749,646 ( 0.02%) 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 748,579 ( 0.02%) ???:rustc_ast::visit::visit_stmts::>'2 [???] 746,575 ( 0.02%) ???: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] 745,752 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/disallowed_methods.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 743,732 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expn_of [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 741,024 ( 0.02%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 740,376 ( 0.02%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 735,007 ( 0.02%) ???:::lower_fn_decl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 732,550 ( 0.02%) ???:::hir_get_parent_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 728,233 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 728,167 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 727,904 ( 0.02%) ???:::node [???] 727,238 ( 0.02%) ???: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] 723,871 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_id/src/lib.rs:clippy_utils::macros::first_node_in_macro:: 722,326 ( 0.02%) ???:::mark_live_symbols [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 722,164 ( 0.02%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 720,893 ( 0.02%) ???:>>::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] 718,830 ( 0.02%) src/eset.c:pa_alloc 715,310 ( 0.02%) ???:::name [???] 714,473 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/size_of_ref.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 713,709 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 713,293 ( 0.02%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 711,258 ( 0.02%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 707,016 ( 0.02%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 706,004 ( 0.02%) ???: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] 703,862 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/unicode.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 699,684 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:::trim_matches::<::is_whitespace> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 699,392 ( 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> 697,147 ( 0.02%) include/jemalloc/internal/tsd.h:realloc 695,248 ( 0.02%) ???:rustc_ast::visit::visit_assoc_items::> [???] 692,018 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 691,860 ( 0.02%) ???: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] 684,944 ( 0.02%) ???:>::with_lint_attrs::< as rustc_ast::visit::Visitor>::visit_param::{closure#0}>::{closure#0} [???] 684,498 ( 0.02%) ???:::{closure#1} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_middle::dep_graph::dep_node::DepNode, rustc_middle::dep_graph::serialized::SerializedDepNodeIndex, rustc_middle::dep_graph::graph::DepNodeIndex)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 684,494 ( 0.02%) ???:::parse_param_general::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 684,188 ( 0.02%) ???: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] 683,648 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs:clippy_lints::operators::eq_op::check_assert 683,606 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/main_recursion.rs:::check_expr_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 683,511 ( 0.02%) ???:::check_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 681,259 ( 0.02%) 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] 679,921 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 677,552 ( 0.02%) ???:::next_match'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 676,334 ( 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 675,917 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 674,974 ( 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] 672,228 ( 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> 670,239 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 668,848 ( 0.02%) 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] 667,245 ( 0.02%) ???:dladdr [/usr/lib/libc.so.6] 663,582 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 663,012 ( 0.02%) 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] 659,833 ( 0.02%) ???:::evaluate_predicate_recursively'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 654,872 ( 0.02%) ???:rustc_hir::intravisit::walk_qpath::> [???] 652,915 ( 0.02%) ???:std::exception::~exception() [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 650,838 ( 0.02%) ???:::next'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 650,732 ( 0.02%) ???:::check_expr [???] 650,600 ( 0.02%) ???:::parse_expr_dot_or_call_with::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 649,355 ( 0.02%) ???:::visit_node:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 647,210 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/loops/while_let_on_iterator.rs:clippy_lints::loops::while_let_on_iterator::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 647,166 ( 0.02%) ???:::flat_map_stmt'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 647,088 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 646,194 ( 0.02%) ???:::parent_hir_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 646,048 ( 0.02%) ???:::hir_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 645,304 ( 0.02%) ???:::resolve_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 644,171 ( 0.02%) ???:::parse_path_segment'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 639,016 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/ineffective_open_options.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 636,592 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/lock.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 632,704 ( 0.02%) ???:rustc_query_impl::query_impl::generics_of::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 632,133 ( 0.02%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 630,989 ( 0.02%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 630,535 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 630,523 ( 0.02%) ???:<&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] 626,512 ( 0.02%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::qpath [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 621,699 ( 0.02%) ???:::from_tokens [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 614,841 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_qpath:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 610,989 ( 0.02%) ???:::resolve_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 610,069 ( 0.02%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 609,890 ( 0.02%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 608,989 ( 0.02%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 608,077 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 606,684 ( 0.02%) ???:::pat_lang_item_variant [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 605,631 ( 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] 605,595 ( 0.02%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 605,230 ( 0.02%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 603,660 ( 0.02%) ???: 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] 601,779 ( 0.02%) ???: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] 598,268 ( 0.02%) include/jemalloc/internal/arena_inlines_b.h:malloc_default 597,779 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_qpath:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 596,332 ( 0.02%) ???:::expect_hir_owner_nodes'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 589,216 ( 0.02%) ???:rustc_query_impl::query_impl::hir_owner_parent_q::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 589,186 ( 0.02%) ???:::add_import::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 589,160 ( 0.02%) 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] 588,576 ( 0.02%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 586,130 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:::visit_qpath [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 585,636 ( 0.02%) ???:::expr_lang_item_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 584,832 ( 0.02%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 584,395 ( 0.02%) ???:rustc_middle::dep_graph::graph::hash_result::<&rustc_data_structures::unord::UnordSet> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 583,385 ( 0.02%) ???:::span_labels [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 583,312 ( 0.02%) ???:rustc_query_impl::query_impl::type_of::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 582,840 ( 0.02%) ???:::cmp [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 582,121 ( 0.02%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 580,988 ( 0.02%) 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] 578,052 ( 0.02%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 576,321 ( 0.02%) ???: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] 574,530 ( 0.02%) src/hook.c:realloc 574,407 ( 0.02%) ???:::from_errors_diagnostic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 572,334 ( 0.02%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 572,299 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/mod.rs:, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 572,076 ( 0.02%) ???:::emit_diagnostic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 571,912 ( 0.02%) 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] 570,944 ( 0.02%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 570,345 ( 0.02%) ???:::parse_local [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 570,087 ( 0.02%) ???:>::grow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 570,068 ( 0.02%) ???:>::decode'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 561,762 ( 0.02%) ???:::lower_expr_try [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 561,472 ( 0.02%) ???:::parse_constness_ [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 560,060 ( 0.02%) ???: as rustc_hir::intravisit::Visitor>::visit_ty [???] 560,040 ( 0.02%) /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:: 559,126 ( 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] 559,024 ( 0.02%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 558,687 ( 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:::check_attributes 558,113 ( 0.02%) ???: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] 557,018 ( 0.02%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 556,121 ( 0.02%) ???:rustc_interface::passes::emit_delayed_lints [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 555,099 ( 0.02%) ???:::parse_limited_sym [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 550,497 ( 0.02%) include/jemalloc/internal/fb.h:pa_alloc 549,231 ( 0.02%) ???:<[rustc_hir::hir::PathSegment] 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] 549,158 ( 0.02%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 547,757 ( 0.02%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 544,988 ( 0.02%) ???:>::reserve_rehash::, alloc::vec::Vec>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 539,268 ( 0.01%) ???: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] 538,884 ( 0.01%) ???:::finish_grow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 538,746 ( 0.01%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 538,416 ( 0.01%) ???:::in_external_macro'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 538,144 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::trim_start_matches::<::is_whitespace> 537,234 ( 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/sync/lock.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 536,723 ( 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 535,237 ( 0.01%) ???:::lookup_line [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 535,183 ( 0.01%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::module_children'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 532,842 ( 0.01%) ???:::lower_attrs_with_extra [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 530,028 ( 0.01%) ???:rustc_ty_utils::assoc::associated_items [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 529,470 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::maybe_walk_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 528,114 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 526,423 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_nested_body [???] 525,696 ( 0.01%) ???:::match_impl::{closure#0} [???] 524,065 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_block'2 [???] 523,506 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 523,294 ( 0.01%) ???: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] 521,594 ( 0.01%) ???:::parse_footnote [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 520,548 ( 0.01%) ???:::prepare_to_combine [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 518,986 ( 0.01%) ???:::imported_source_file::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 518,697 ( 0.01%) ???:pulldown_cmark::firstpass::run_first_pass [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 518,396 ( 0.01%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 518,000 ( 0.01%) ???:::deref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 517,416 ( 0.01%) ???:::flat_map_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 516,805 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/cognitive_complexity.rs:rustc_hir::intravisit::walk_expr::::check::{closure#0}>>'2 514,106 ( 0.01%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 513,785 ( 0.01%) ???: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] 513,448 ( 0.01%) ???:::brg_visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 513,439 ( 0.01%) ???:::parse_expr_assoc_with [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 512,002 ( 0.01%) ???: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] 510,642 ( 0.01%) /rust/deps/thin-vec-0.2.19/src/lib.rs:::check_attributes 510,426 ( 0.01%) ???:::expn_def_scope [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 508,562 ( 0.01%) include/jemalloc/internal/atomic.h:tcache_bin_flush_small 507,487 ( 0.01%) ???:::parse_visibility [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 507,285 ( 0.01%) ???:::encode_symbol [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 506,950 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/functions/too_many_lines.rs:::check_fn 504,406 ( 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 504,333 ( 0.01%) include/jemalloc/internal/rtree.h:ecache_evict 504,047 ( 0.01%) ???:::emit_diagnostic::{closure#3} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 502,140 ( 0.01%) ???:>::univariant::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 502,102 ( 0.01%) ???: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] 502,056 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:::check_attributes 501,930 ( 0.01%) ???:>>::walk_ref [???] 500,553 ( 0.01%) ???:::flat_map_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 500,335 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_block [???] 500,020 ( 0.01%) ???:> 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] 499,065 ( 0.01%) ???: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] 496,951 ( 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] 495,750 ( 0.01%) ???:> 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] 491,568 ( 0.01%) ???:rustc_ast::visit::walk_fn::> [???] 490,258 ( 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] 489,164 ( 0.01%) ???:::expr_ident_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 487,725 ( 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] 487,410 ( 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] 486,363 ( 0.01%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 484,929 ( 0.01%) ???:::rollback_to [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 484,050 ( 0.01%) ???:::get_diagnostic_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 483,653 ( 0.01%) ???: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] 483,388 ( 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] 481,954 ( 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 481,909 ( 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 481,618 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 481,309 ( 0.01%) ???:::resolve_block'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 481,283 ( 0.01%) ???:rustc_ast::visit::walk_item_inner::>'2 [???] 477,751 ( 0.01%) ???: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] 477,445 ( 0.01%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 476,220 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 475,360 ( 0.01%) ???:::edition [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 471,206 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 469,650 ( 0.01%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 468,991 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/validations.rs:::trim_matches::<::is_whitespace> 468,861 ( 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] 468,053 ( 0.01%) ???: as rustc_ast::visit::Visitor>::visit_stmt::{closure#0}'2 [???] 467,774 ( 0.01%) ???:::lower_block_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 466,518 ( 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] 464,354 ( 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] 464,134 ( 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 463,753 ( 0.01%) ???:::fn_sig'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 463,591 ( 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] 463,503 ( 0.01%) include/jemalloc/internal/atomic.h:realloc 463,061 ( 0.01%) ???:>>::walk_ref [???] 461,508 ( 0.01%) ???:::symbol_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 460,868 ( 0.01%) include/jemalloc/internal/jemalloc_internal_inlines_a.h:realloc 460,569 ( 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] 460,138 ( 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] 458,441 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/pattern.rs:::check_fn 457,869 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 457,788 ( 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] 455,731 ( 0.01%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 454,381 ( 0.01%) include/jemalloc/internal/tcache_inlines.h:malloc_default 453,725 ( 0.01%) ???:rustc_traits::evaluate_obligation::evaluate_obligation [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 453,698 ( 0.01%) ???:::parse_expr_force_collect [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 452,932 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_utils::macros::root_macro_call 452,908 ( 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] 451,349 ( 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> 451,287 ( 0.01%) ???:::finalize_import::{closure#2} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 451,034 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 450,098 ( 0.01%) ???:::expect [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 449,611 ( 0.01%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 449,568 ( 0.01%) ???:::typing_mode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 449,327 ( 0.01%) ???:::lower_use_tree'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 448,050 ( 0.01%) ???:::typing_env [???] 447,695 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 446,328 ( 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] 445,511 ( 0.01%) ???:::write_import_resolutions::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 443,969 ( 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] 443,472 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_expr 443,326 ( 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] 441,100 ( 0.01%) ???: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] 440,958 ( 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] 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] 438,789 ( 0.01%) ???:>::reserve::do_reserve_and_handle:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 438,135 ( 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] 436,716 ( 0.01%) ???:::hir_span'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 435,782 ( 0.01%) ???:rustc_mir_transform::mir_keys'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 435,022 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/regex.rs:::check_expr_post 434,799 ( 0.01%) ???:::clone'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 434,154 ( 0.01%) src/extent.c:pa_alloc 432,052 ( 0.01%) ???:::hir_owner_parent [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 430,450 ( 0.01%) ???:::try_plant_decl_into_local_module [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 429,536 ( 0.01%) ???:::flat_map_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 428,912 ( 0.01%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, rustc_middle::ty::assoc::AssocItem>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 428,196 ( 0.01%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 427,950 ( 0.01%) ???:core::str::count::char_count_general_case [???] 427,424 ( 0.01%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 426,510 ( 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] 425,970 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check_clippy [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 425,905 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:::check_attributes 425,563 ( 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 423,807 ( 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,711 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_path::> 421,437 ( 0.01%) ???:>>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 421,262 ( 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,052 ( 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,047 ( 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,032 ( 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,024 ( 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,024 ( 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,024 ( 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,024 ( 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,024 ( 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,024 ( 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,024 ( 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,024 ( 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,024 ( 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,024 ( 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 421,024 ( 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 419,933 ( 0.01%) ???:::hir_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 416,168 ( 0.01%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memchr-2.8.2/src/arch/generic/memchr.rs:memchr::arch::x86_64::memchr::memchr_raw::find_avx2 414,561 ( 0.01%) ???:::type_dependent_def [???] 414,318 ( 0.01%) ???:::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 413,463 ( 0.01%) ???:::lower_maybe_coroutine_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 413,324 ( 0.01%) ???:::encode_info_for_mod [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 412,903 ( 0.01%) ???:<&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] 411,820 ( 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] 410,996 ( 0.01%) ???:::is_impl_trait_in_trait [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 410,964 ( 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] 410,610 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::method_chain_args [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 409,299 ( 0.01%) ???:::brg_visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 408,430 ( 0.01%) include/jemalloc/internal/sz.h:malloc_default 407,125 ( 0.01%) ???:::parse_pat_with_range_pat'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 405,504 ( 0.01%) ???:::parse_expr_prefix [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 405,199 ( 0.01%) ???:::lower_pat_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 405,105 ( 0.01%) ???:::instantiate_identity_into [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 404,879 ( 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 404,787 ( 0.01%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 404,314 ( 0.01%) ???:rustc_hir::intravisit::walk_pat::> [???] 404,073 ( 0.01%) ???:::build_reduced_graph_for_use_tree'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 403,879 ( 0.01%) ???:::create_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 401,905 ( 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 401,244 ( 0.01%) ???:>::with_lint_attrs::< as rustc_ast::visit::Visitor>::visit_local::{closure#0}>::{closure#0} [???] 399,546 ( 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] 399,179 ( 0.01%) ???:rustc_ast::visit::visit_items::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 397,939 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 397,371 ( 0.01%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 396,853 ( 0.01%) ???:<[rustc_ast::tokenstream::TokenTree] as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 396,780 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:clippy_utils::method_chain_args 395,965 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:::check_expr 395,342 ( 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 395,192 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 394,652 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 393,906 ( 0.01%) ???:rustc_ast::visit::walk_item_inner::> [???] 391,172 ( 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] 390,552 ( 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] 390,339 ( 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 389,423 ( 0.01%) ???:::mk_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 386,800 ( 0.01%) ???:annotate_snippets::renderer::render::draw_line'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 382,548 ( 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] 382,525 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 382,351 ( 0.01%) ???:::visit_generic_arg [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 381,255 ( 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 381,192 ( 0.01%) ???:::end_point [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 380,643 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context.rs:::def_key:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 380,511 ( 0.01%) ???:::visit_node::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 380,097 ( 0.01%) ???:::try_mark_green [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 379,234 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 378,413 ( 0.01%) ???:::parent_module_from_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 377,914 ( 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 377,829 ( 0.01%) ???: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] 376,757 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unused_unit.rs:::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 376,695 ( 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] 375,461 ( 0.01%) ???: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] 374,048 ( 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 373,851 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_to_owned.rs:clippy_lints::methods::unnecessary_to_owned::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 373,476 ( 0.01%) ???:::pat_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 373,360 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:clippy_utils::macros::first_node_in_macro:: 372,876 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unit_types/mod.rs:::check_expr 372,363 ( 0.01%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 371,834 ( 0.01%) ???:::expr_adjustments [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 368,409 ( 0.01%) ???: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] 367,523 ( 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] 366,649 ( 0.01%) ???:0x0000000000029600 [/usr/lib/ld-linux-x86-64.so.2] 366,084 ( 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] 365,516 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/pattern.rs:::trim_start_matches::<::is_whitespace> 364,204 ( 0.01%) ???: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] 363,939 ( 0.01%) ???:::walk_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 363,567 ( 0.01%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 363,346 ( 0.01%) ???:>::reserve_rehash::>>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 362,933 ( 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] 362,332 ( 0.01%) ???:rustc_query_impl::query_impl::typeck_root::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 361,996 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 360,887 ( 0.01%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 359,625 ( 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] 359,474 ( 0.01%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 359,017 ( 0.01%) ???:, 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] 358,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:::check_expr 358,156 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 358,038 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 357,937 ( 0.01%) ???:rustc_lint::expect::lint_expectations [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 357,394 ( 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] 356,733 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 355,956 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 355,650 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/attr/version.rs:::meets 355,650 ( 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] 355,650 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets 354,689 ( 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] 354,284 ( 0.01%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 354,222 ( 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] 353,840 ( 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 353,508 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 353,508 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 351,750 ( 0.01%) ???:::node_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 351,750 ( 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] 351,500 ( 0.01%) ???:>::reserve_rehash::, rustc_type_ir::sty::Region>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 351,256 ( 0.01%) ???:rustc_lint::levels::skippable_lints'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 351,028 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::check_ty 349,420 ( 0.01%) ???:rustc_hir_analysis::check_crate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 349,323 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 348,835 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 348,421 ( 0.01%) ???:::from_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 348,006 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 346,257 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs: as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find_map::check<(rustc_span::hygiene::ExpnId, rustc_span::hygiene::ExpnData), clippy_utils::macros::MacroCall, &mut clippy_utils::macros::macro_backtrace::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 345,669 ( 0.01%) include/jemalloc/internal/tsd_tls.h:realloc 345,483 ( 0.01%) ???:::exec_cache_promotions [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 345,248 ( 0.01%) ???: as alloc::vec::spec_extend::SpecExtend>>::spec_extend [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 345,005 ( 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] 343,807 ( 0.01%) ???:::parse_path_inner'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 343,182 ( 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 342,962 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:clippy_lints::casts::cast_slice_different_sizes::expr_cast_chain_tys 342,809 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 342,074 ( 0.01%) ???:::typeck_root_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 340,724 ( 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 340,724 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:::check_attributes_post 340,443 ( 0.01%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 339,550 ( 0.01%) ???:rustc_query_impl::query_impl::coroutine_kind::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 338,173 ( 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::> 338,135 ( 0.01%) ???:::send_new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 337,829 ( 0.01%) ???: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] 335,874 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_closure [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 335,394 ( 0.01%) ???:>::instantiate_supertrait [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 334,976 ( 0.01%) ???:::visit_qpath [???] 334,804 ( 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 332,367 ( 0.01%) ???:::flat_map_stmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 329,518 ( 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::> 328,349 ( 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] 327,907 ( 0.01%) ???: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] 327,766 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 326,612 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:::check_expr 325,730 ( 0.01%) ???:::evaluate_root_obligation [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 325,728 ( 0.01%) ???:::fill_well_known'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 325,354 ( 0.01%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 325,194 ( 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] 325,172 ( 0.01%) ???: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] 324,938 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::visit_expr'2 324,600 ( 0.01%) ???:::handle_res [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 324,472 ( 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] 324,403 ( 0.01%) ???:>>::walk_ref [???] 324,139 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:::check_expr 323,716 ( 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] 322,896 ( 0.01%) ???:rustc_ast_pretty::pprust::path_to_string [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 319,055 ( 0.01%) ???:::make [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 317,871 ( 0.01%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 317,765 ( 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] 316,933 ( 0.01%) ???:::emit_diagnostic::{closure#3}::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 316,533 ( 0.01%) ???:::splice_lines::push_trailing [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 316,513 ( 0.01%) ???:::hash::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 316,231 ( 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] 315,674 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 315,344 ( 0.01%) ???:>>>>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 314,613 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/needless_parens_on_range_literals.rs:::check_expr 314,599 ( 0.01%) ???:::hash::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 314,440 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs:clippy_lints::operators::float_cmp::check_assert 314,330 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:clippy_utils::macros::root_macro_call 314,303 ( 0.01%) ???:>::tys'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 313,786 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 312,880 ( 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] 312,860 ( 0.01%) ???: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] 312,559 ( 0.01%) ???: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] 311,621 ( 0.01%) ???: as rustc_ast::visit::Visitor>::visit_fn [???] 311,276 ( 0.01%) ???: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] 310,983 ( 0.01%) ???:::eq [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 310,730 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 310,730 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 310,730 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 310,730 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 310,730 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:::check_expr 310,730 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/functions/mod.rs:::check_expr 309,409 ( 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] 309,267 ( 0.01%) ???:::fn_sig [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 309,122 ( 0.01%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 309,045 ( 0.01%) ???:::is_valid_span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 308,490 ( 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 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 308,137 ( 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] 307,082 ( 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 305,959 ( 0.01%) ???:::hash::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 305,170 ( 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 304,921 ( 0.01%) ???:rustc_middle::query::inner::query_feed::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 304,822 ( 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] 304,394 ( 0.01%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 303,462 ( 0.01%) /rust/deps/indexmap-2.14.0/src/map.rs:>::swap_remove:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 303,246 ( 0.01%) ???:::trim_matches::<::is_whitespace> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 303,030 ( 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] 302,696 ( 0.01%) ???:::annotated_lines [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 302,218 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 302,186 ( 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] 302,011 ( 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] 301,280 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 300,213 ( 0.01%) ???:> 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] 300,019 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/manual_non_exhaustive.rs:::check_expr 299,855 ( 0.01%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 299,296 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 298,691 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 298,525 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/disallowed_fields.rs:::check_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 298,452 ( 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] 297,922 ( 0.01%) ???:::annotated_snippet [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 296,534 ( 0.01%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 296,264 ( 0.01%) ???:::mk_layout [???] 295,015 ( 0.01%) include/jemalloc/internal/cache_bin.h:tcache_bin_flush_stashed 294,820 ( 0.01%) ???:::look_ahead::::parse_self_param::{closure#2}::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 294,726 ( 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 294,102 ( 0.01%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 294,052 ( 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 293,656 ( 0.01%) ???:::single_pat_field [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 293,544 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_utils::macros::matching_root_macro_call 293,484 ( 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 293,484 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs:::check_attributes_post 293,317 ( 0.01%) include/jemalloc/internal/edata.h:ecache_evict 292,803 ( 0.01%) ???:<[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] 292,266 ( 0.01%) ???:::render_multispans_macro_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 291,694 ( 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 291,694 ( 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 291,694 ( 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 291,694 ( 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 291,492 ( 0.01%) ???:::without_first_quote [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 291,435 ( 0.01%) ???:::imported_source_file [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 291,180 ( 0.01%) ???: as rustc_ast::visit::Visitor>::visit_item'2 [???] 290,863 ( 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 290,805 ( 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] 290,371 ( 0.01%) ???:::parse_self_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 289,856 ( 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] 289,041 ( 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] 288,420 ( 0.01%) ???:rustc_query_impl::query_impl::coroutine_kind::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 288,280 ( 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] 287,762 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lexer/src/lib.rs:::with_source_text::::{closure#0}> 286,674 ( 0.01%) include/jemalloc/internal/cache_bin.h:tcache_bin_flush_small 286,066 ( 0.01%) ???:::trait_impl_of_assoc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 285,817 ( 0.01%) ???:::hir_impl_item [???] 285,191 ( 0.01%) ???: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] 284,800 ( 0.01%) ???:::as_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 284,678 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next 284,303 ( 0.01%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 284,296 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 283,894 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 283,696 ( 0.01%) ???:::pat_ident_binding_mode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 283,664 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 282,432 ( 0.01%) ???:::resolve_crate::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 282,237 ( 0.01%) ???:>, ::emit_messages_default::{closure#8}> as core::iter::traits::iterator::Iterator>::next'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 282,212 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::visit_pat 281,708 ( 0.01%) ???:::eq [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 281,302 ( 0.01%) ???: as rustc_serialize::serialize::Encodable>::encode [???] 281,196 ( 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] 281,051 ( 0.01%) ???:::parse_attr_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 280,669 ( 0.01%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::associated_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 280,608 ( 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] 280,401 ( 0.01%) ???:::check_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 280,344 ( 0.01%) ???:::expand_ext [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 279,562 ( 0.01%) ???:::encode_symbol [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 279,430 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 278,778 ( 0.01%) ???:rustc_query_impl::plumbing::encode_query_values_inner::, rustc_middle::dep_graph::graph::DepNodeIndex>, &rustc_data_structures::unord::UnordSet>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 278,676 ( 0.01%) ???:> as rustc_serialize::serialize::Decodable>::decode'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 278,669 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 278,297 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:::check_fn 278,216 ( 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] 277,744 ( 0.01%) ???:::check_attributes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 277,540 ( 0.01%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::query::erase::ErasedData<[u8; 16]>>, true>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 277,530 ( 0.01%) ???:::is_const_fn:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 276,115 ( 0.01%) ???:::visit_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 275,683 ( 0.01%) ???:::check_for_ambiguity::, rustc_expand::mbe::macro_rules::NoopTracker> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 275,604 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:::meets 275,221 ( 0.01%) ???: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] 274,906 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::meets 274,906 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:::meets 274,714 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 274,670 ( 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] 274,467 ( 0.01%) ???:::check_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 274,361 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 274,355 ( 0.01%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 274,252 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::has_let_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 273,011 ( 0.01%) include/jemalloc/internal/rtree.h:pa_dalloc 272,484 ( 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] 271,952 ( 0.01%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 271,916 ( 0.01%) ???:::eat_token_lit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 271,637 ( 0.01%) ???:>::tys [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 271,565 ( 0.01%) ???:rustc_attr_parsing::validate_attr::check_attr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 271,488 ( 0.01%) ???: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] 271,404 ( 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 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 270,505 ( 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] 270,475 ( 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] 269,964 ( 0.01%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 269,684 ( 0.01%) ???:::def_path_hash [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 268,617 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 268,617 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 268,617 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:>::with::<::with::outer_expn::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnId> 268,384 ( 0.01%) ???:::evaluate_predicate_recursively [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 267,979 ( 0.01%) /rust/deps/indexmap-2.14.0/src/map.rs:>::get:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 267,820 ( 0.01%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 267,693 ( 0.01%) ???:::expand_struct_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 267,275 ( 0.01%) ???:::evaluate_obligation [???] 266,293 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/vec_init_then_push.rs:::check_expr 265,298 ( 0.01%) ???:rustc_query_impl::query_impl::implementations_of_trait::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 263,862 ( 0.01%) ???:::from_multispan [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 263,120 ( 0.01%) ???:::check_stmt [???] 262,496 ( 0.01%) ???:>>::walk_ref [???] 261,651 ( 0.01%) ???: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] 261,624 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::hir 261,539 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 261,539 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 261,239 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/suspicious_trait_impl.rs:::check_expr 261,220 ( 0.01%) ???:::span_to_lines [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 261,211 ( 0.01%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 260,669 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 260,389 ( 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 260,286 ( 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} 260,017 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 259,495 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 259,273 ( 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] 259,165 ( 0.01%) ???:rustc_query_impl::query_impl::trivial_const::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 258,990 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::check_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 257,374 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs:::check_attributes 257,349 ( 0.01%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 257,171 ( 0.01%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 257,003 ( 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] 256,861 ( 0.01%) ???:::check_expr_post [???] 256,102 ( 0.01%) ???:<[rustc_span::def_id::LocalDefId] as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 255,732 ( 0.01%) ???:::filter_map_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 255,543 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::check_attributes 255,543 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:clippy_lints::doc::suspicious_doc_comments::check 255,543 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:clippy_lints::doc::suspicious_doc_comments::check 255,336 ( 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:: 255,321 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs:::check_attributes 254,899 ( 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::SpecFromIter, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option>>>::from_iter 254,387 ( 0.01%) ???:>::reserve_rehash::>>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 254,076 ( 0.01%) ???:rustc_expand::mbe::quoted::parse'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 252,013 ( 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 251,262 ( 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] 250,944 ( 0.01%) ???:rustc_ast::visit::visit_generic_params::> [???] 250,668 ( 0.01%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memchr-2.8.2/src/arch/x86_64/avx2/memchr.rs:memchr::arch::x86_64::memchr::memchr_raw::find_avx2 250,241 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/swap.rs:::check_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 249,979 ( 0.01%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 249,859 ( 0.01%) ???:>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 249,634 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:::check_attributes 249,283 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/uninit_vec.rs:::check_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 249,248 ( 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] 248,942 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_qpath:: 248,794 ( 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] 248,625 ( 0.01%) ???:::alloc_ctxt'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 248,515 ( 0.01%) ???:::visit_pat [???] 248,498 ( 0.01%) ???:::check_lint_name [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 248,136 ( 0.01%) ???:::hir_body_owner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 247,865 ( 0.01%) ???:::check_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 247,794 ( 0.01%) include/jemalloc/internal/mutex.h:pa_alloc 247,670 ( 0.01%) ???:rustc_hir::intravisit::walk_qpath:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 246,309 ( 0.01%) ???:::create_derived_impl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 246,075 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unneeded_struct_pattern.rs:::check_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 245,883 ( 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] 245,225 ( 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] 244,975 ( 0.01%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 244,964 ( 0.01%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 244,299 ( 0.01%) ???:::filter_map_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 243,756 ( 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] 243,534 ( 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] 243,404 ( 0.01%) ???:::mk_canonical_var_kinds [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 243,320 ( 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] 242,798 ( 0.01%) ???:>::initialize::<>::get_or_init<::create_global_ctxt, rustc_interface::passes::create_and_enter_global_ctxt, rustc_driver_impl::run_compiler::{closure#0}::{closure#1}>::{closure#2}>::{closure#1}>::{closure#0}, !> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 242,424 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 242,162 ( 0.01%) include/jemalloc/internal/thread_event.h:malloc_default 241,731 ( 0.01%) ???:::symbol_path'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 241,243 ( 0.01%) ???:::emit_diagnostic::{closure#3}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 241,031 ( 0.01%) ???:>::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 240,688 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 240,627 ( 0.01%) ???:::lower_generic_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 239,761 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/control_flow.rs: as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find_map::check<(rustc_span::hygiene::ExpnId, rustc_span::hygiene::ExpnData), clippy_utils::macros::MacroCall, &mut clippy_utils::macros::macro_backtrace::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 239,269 ( 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}> [???] 238,722 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 238,722 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 238,722 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 238,692 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_utils::is_in_const_context 238,548 ( 0.01%) ???:::lower_format_args'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 238,299 ( 0.01%) ???: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] 237,900 ( 0.01%) ???:>>::walk_ref'2 [???] 237,263 ( 0.01%) ???:::expr_ty_adjusted [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 237,024 ( 0.01%) ???:::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] 236,937 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/matches/rest_pat_in_fully_bound_struct.rs:clippy_lints::matches::rest_pat_in_fully_bound_struct::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 236,906 ( 0.01%) ???:::parse_arm::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 236,201 ( 0.01%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 235,716 ( 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] 235,622 ( 0.01%) ???:__cxa_finalize [/usr/lib/libc.so.6] 235,307 ( 0.01%) include/jemalloc/internal/ph.h:eset_remove 234,823 ( 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] 234,409 ( 0.01%) include/jemalloc/internal/edata.h:malloc_default 234,347 ( 0.01%) src/sz.c:pa_alloc 233,746 ( 0.01%) ???:::from_self [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 233,541 ( 0.01%) ???:>::reserve_rehash::, ()>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 232,754 ( 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] 232,490 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/filter_map.rs:clippy_utils::macros::root_macro_call 232,233 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/manual_range_patterns.rs:::check_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 231,624 ( 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 231,139 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_qpath:: 230,720 ( 0.01%) include/jemalloc/internal/bit_util.h:pa_alloc 230,452 ( 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] 229,671 ( 0.01%) ???:::visit_method_receiver_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 228,913 ( 0.01%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 228,842 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 228,391 ( 0.01%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 228,144 ( 0.01%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 227,354 ( 0.01%) ???:::hir_expect_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 226,990 ( 0.01%) ???:>, ())>>::reserve_rehash::>, (), rustc_hash::FxBuildHasher>::{closure#0}> [???] 226,160 ( 0.01%) ???:::cmp [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 225,375 ( 0.01%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, &[rustc_span::def_id::DefId]>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 225,344 ( 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] 225,334 ( 0.01%) ???:::fix_multispan_in_extern_macros [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 224,850 ( 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] 224,728 ( 0.01%) ???:::check_target [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 224,028 ( 0.01%) ???:, 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] 223,855 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_utils::is_expn_of 222,546 ( 0.01%) 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] 222,513 ( 0.01%) 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 222,034 ( 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] 221,910 ( 0.01%) ???:::list_from_tokens [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 221,582 ( 0.01%) ???:>), rustc_middle::traits::cache::WithDepNode)>>::reserve_rehash::>), rustc_middle::traits::cache::WithDepNode, rustc_hash::FxBuildHasher>::{closure#0}> [???] 221,535 ( 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] 221,014 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/control_flow.rs:clippy_utils::macros::first_node_in_macro:: 220,990 ( 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] 220,729 ( 0.01%) include/jemalloc/internal/edata.h:pa_dalloc 220,538 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/needless_borrowed_ref.rs:::check_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 220,447 ( 0.01%) ???:::mut_visit_with:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 220,348 ( 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] 220,238 ( 0.01%) include/jemalloc/internal/jemalloc_internal_inlines_b.h:malloc_default 220,160 ( 0.01%) /rust/deps/smallvec-1.15.1/src/lib.rs: as core::iter::traits::collect::Extend>::extend::>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 219,802 ( 0.01%) ???:::visit_method_receiver_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 219,782 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/no_effect.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 218,726 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_fn [???] 218,484 ( 0.01%) ???:::break_and_eat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 217,805 ( 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] 217,580 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 217,063 ( 0.01%) ???:::visit_stmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 215,793 ( 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] 215,628 ( 0.01%) ???:> as rustc_ast::visit::Visitable>>::visit [???] 215,404 ( 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] 215,188 ( 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] 214,881 ( 0.01%) ???:rustc_privacy::effective_visibilities [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 214,780 ( 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] 214,283 ( 0.01%) ???:::register_lints [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 214,167 ( 0.01%) ???:::visit_generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 213,774 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 213,584 ( 0.01%) ???:::build_with_typing_env [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 213,405 ( 0.01%) ???:::resolve_arm [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 213,050 ( 0.01%) ???:>::fold_predicate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 212,595 ( 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] 211,859 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:clippy_utils::macros::first_node_in_macro:: 211,727 ( 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] 211,520 ( 0.01%) ???: as rustc_ast::visit::Visitor>::visit_field_def::{closure#0} [???] 211,371 ( 0.01%) ???:::walk::<::check_consistent_bindings::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 211,309 ( 0.01%) ???:::const_eval_resolve [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 211,036 ( 0.01%) ???:::lower_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 210,969 ( 0.01%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 210,800 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_expr [???] 210,571 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 210,518 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/misc_early/redundant_pattern.rs:clippy_lints::misc_early::redundant_pattern::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 210,426 ( 0.01%) ???:>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 210,345 ( 0.01%) ???:>::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] 210,288 ( 0.01%) ???:rustc_ast::visit::visit_stmts::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 209,721 ( 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] 209,721 ( 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] 209,097 ( 0.01%) ???:llvm::DenseMapBase, llvm::detail::DenseMapPair >, llvm::StringRef, llvm::cl::Option*, llvm::DenseMapInfo, llvm::detail::DenseMapPair >::moveFrom(llvm::DenseMap, llvm::detail::DenseMapPair >&) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 208,744 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unused_io_amount.rs:::check_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 208,033 ( 0.01%) ???:::parse_generic_params [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 207,953 ( 0.01%) ???:::requires_monomorphization [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 207,870 ( 0.01%) src/tcache.c:malloc_default 207,859 ( 0.01%) ???:>>::walk_ref'2 [???] 207,592 ( 0.01%) ???:::parse_field_def::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 207,208 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 206,902 ( 0.01%) include/jemalloc/internal/ph.h:ecache_evict 206,420 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:, clippy_utils::macros::first_node_macro_backtrace::{closure#0}> as core::iter::traits::iterator::Iterator>::try_fold::<(), >::iter_try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, as core::iter::traits::iterator::Iterator>::try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 206,410 ( 0.01%) ???:>::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 206,047 ( 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] 205,912 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:rustc_hir::intravisit::walk_expr::>'2 205,474 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr_post 204,362 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 204,295 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:clippy_lints::unwrap::extract_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 204,162 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 203,083 ( 0.01%) ???:::from_def_id [???] 202,505 ( 0.01%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::is_doc_hidden [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 202,467 ( 0.01%) ???: as rustc_hir::intravisit::Visitor>::visit_generics [???] 202,261 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lexer/src/lib.rs:::eq [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 202,194 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::trim_start_matches::<::is_whitespace> 202,070 ( 0.01%) ???:::walk_::<::necessary_variants::{closure#0}> [???] 200,945 ( 0.01%) ???:::check_stability_allow_unstable [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 200,688 ( 0.01%) ???:::parse_where_clause_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 200,656 ( 0.01%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 200,499 ( 0.01%) ???:::expr_ty_adjusted_opt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 200,406 ( 0.01%) ???:::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 200,253 ( 0.01%) include/jemalloc/internal/sz.h:tcache_bin_flush_small 199,938 ( 0.01%) include/jemalloc/internal/atomic.h:pa_alloc 199,556 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_ty 199,536 ( 0.01%) ???:::lower_expr_field [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 199,332 ( 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] 199,050 ( 0.01%) ???: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] 198,980 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/useless_conversion.rs:::check_expr_post 198,677 ( 0.01%) ???:::string [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 198,288 ( 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] 197,944 ( 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] 197,596 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 197,596 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 197,596 ( 0.01%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 197,457 ( 0.01%) ???:::generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 196,929 ( 0.01%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 196,440 ( 0.01%) /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> 196,212 ( 0.01%) ???:::puts [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 196,200 ( 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] 196,157 ( 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] 195,698 ( 0.01%) ???:::create_method [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 195,600 ( 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] 194,711 ( 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] 194,639 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:rustc_hir::intravisit::walk_expr::>'2 193,861 ( 0.01%) ???:::visit_fn'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 193,564 ( 0.01%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 192,994 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:clippy_lints::unnested_or_patterns::lint_unnested_or_patterns [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 192,840 ( 0.01%) ???:::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] 192,456 ( 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] 191,942 ( 0.01%) ???:0x000000000000ad20 [/usr/lib/ld-linux-x86-64.so.2] 191,891 ( 0.01%) ???:::decode_symbol [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 190,890 ( 0.01%) ???:::is_freeze [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 190,578 ( 0.01%) include/jemalloc/internal/sz.h:eset_remove 190,488 ( 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/sync/lock.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 189,829 ( 0.01%) ???:::from_sub_diagnostic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 189,754 ( 0.01%) ???:>>::walk_ref [???] 189,681 ( 0.01%) ???:::set_bindings_effective_visibilities [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 189,471 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 189,471 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::check_attributes_post [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 189,402 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs: as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find_map::check<(rustc_span::hygiene::ExpnId, rustc_span::hygiene::ExpnData), clippy_utils::macros::MacroCall, &mut clippy_utils::macros::macro_backtrace::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 189,063 ( 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:, 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> 188,888 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 188,888 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 188,888 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 188,888 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 188,888 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 188,840 ( 0.01%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 188,736 ( 0.01%) ???:::parse_struct_fields [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 188,562 ( 0.01%) include/jemalloc/internal/ph.h:pa_dalloc 188,523 ( 0.01%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 188,318 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 188,075 ( 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] 187,692 ( 0.01%) ???:::pad_integral [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 187,590 ( 0.01%) ???:::print_def_path'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 187,572 ( 0.01%) site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::visit_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 187,473 ( 0.01%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 187,177 ( 0.01%) ???:::visit_generic_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 186,702 ( 0.01%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 186,680 ( 0.01%) /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:: 186,671 ( 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] 186,648 ( 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] 186,611 ( 0.01%) include/jemalloc/internal/mutex.h:malloc_default 186,471 ( 0.01%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::Stmt; 1]>>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 186,438 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:::check_expr 186,438 ( 0.01%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/control_flow.rs:clippy_lints::operators::eq_op::check_assert 186,206 ( 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] 186,112 ( 0.01%) include/jemalloc/internal/edata.h:eset_remove 185,163 ( 0.01%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 184,965 ( 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::attrs::parse_attrs::<::push_attrs::{closure#0}, rustc_hir::hir::Attribute> 184,789 ( 0.01%) ???:>>::walk_ref'2 [???] 184,600 ( 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] 184,384 ( 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:::qpath 184,000 ( 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] 183,510 ( 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] 183,354 ( 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] 183,280 ( 0.01%) ???: as rustc_ast::visit::Visitor>::visit_pat'2 [???] 182,963 ( 0.01%) ???:::pop [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 182,883 ( 0.01%) src/tcache.c:free_default 182,654 ( 0.01%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 182,465 ( 0.01%) ???:::visit_ty_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 182,180 ( 0.01%) ???:::ancestors [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 181,966 ( 0.01%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 181,482 ( 0.00%) ???:::into_outputs [???] 181,477 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 180,484 ( 0.00%) ???: as rustc_ast::visit::Visitor>::visit_item [???] 180,356 ( 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] 180,326 ( 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] 180,130 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 180,078 ( 0.00%) ???:rustc_ast::visit::visit_arms::> [???] 179,790 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:::check 179,783 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs:::finish_grow 178,681 ( 0.00%) ???:rustc_hir_analysis::check::region::resolve_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 178,565 ( 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 178,469 ( 0.00%) ???:::lower_arm [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 178,013 ( 0.00%) ???:>::append_text [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 177,825 ( 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 177,469 ( 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] 177,241 ( 0.00%) 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] 176,501 ( 0.00%) ???:::lower_use_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 176,407 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/doc/missing_headers.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 176,114 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 175,957 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 175,952 ( 0.00%) ???: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] 175,885 ( 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 175,653 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 175,594 ( 0.00%) ???:::parse_ident_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 174,750 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/duplicated_attributes.rs:::check_attributes 174,743 ( 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] 174,388 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sharded.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 174,090 ( 0.00%) ???:::body_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 173,824 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/utils/dump_hir.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 173,610 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 173,565 ( 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:::trim_matches::<::is_whitespace> 173,340 ( 0.00%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/extent.c:ecache_evict [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 173,010 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 173,005 ( 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] 172,308 ( 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] 172,249 ( 0.00%) ???:::hir_item [???] 172,003 ( 0.00%) 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] 171,329 ( 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:: 171,302 ( 0.00%) ???:>::super_fold_with:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 171,060 ( 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 170,810 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 170,730 ( 0.00%) ???:::insert'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 170,712 ( 0.00%) ???:::parse_generic_bounds_common [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 170,670 ( 0.00%) ???:::parse_expr_paren_seq'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 170,374 ( 0.00%) ???:rustc_builtin_macros::format::make_format_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 170,362 ( 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 169,967 ( 0.00%) ???:>, rustc_hash::FxBuildHasher> as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 169,719 ( 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] 169,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_utils::attrs::parse_attrs::<::pop_attrs::{closure#0}, rustc_hir::hir::Attribute> 168,954 ( 0.00%) ???:::parse_expr_field::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 168,946 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::check_body [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 168,357 ( 0.00%) ???:>>::drop_slow'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 168,344 ( 0.00%) 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] 168,280 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 168,144 ( 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] 167,941 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 167,903 ( 0.00%) ???:__rustc::__rust_realloc [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 167,568 ( 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] 167,156 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::Stmt; 1]>>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 167,140 ( 0.00%) ???:::lower_expr_if [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 166,755 ( 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] 166,677 ( 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> 166,625 ( 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] 166,531 ( 0.00%) ???:::hash_one::<&std::path::PathBuf> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 166,530 ( 0.00%) ???:>::sub:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 166,462 ( 0.00%) include/jemalloc/internal/ticker.h:malloc_default 166,446 ( 0.00%) ???:::hir_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 165,965 ( 0.00%) ???:::parse_meta_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 165,864 ( 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] 165,600 ( 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 165,436 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_path 165,314 ( 0.00%) include/jemalloc/internal/ph.h:malloc_default 165,120 ( 0.00%) ???:::span_to_location_info [???] 164,999 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 164,865 ( 0.00%) 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] 164,757 ( 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 164,520 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 164,400 ( 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] 164,379 ( 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 164,301 ( 0.00%) ???:::check_tokens [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 163,988 ( 0.00%) ???: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] 163,637 ( 0.00%) ???:::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 163,329 ( 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] 163,245 ( 0.00%) ???:::try_mark_green [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 163,160 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::has_non_exhaustive_attr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 163,120 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 162,901 ( 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 162,451 ( 0.00%) ???:::expr_ty_opt [???] 161,754 ( 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 161,641 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 161,152 ( 0.00%) ???:::apply_mark [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 161,112 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 160,366 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/visit.rs:>::walk_ref [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 159,516 ( 0.00%) 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] 159,100 ( 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:: 158,974 ( 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] 158,841 ( 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 158,758 ( 0.00%) ???:::meta [???] 158,758 ( 0.00%) ???:::update_field [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 158,639 ( 0.00%) ???:::instantiate_identity_into'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 158,283 ( 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] 157,685 ( 0.00%) ???:rustc_query_impl::query_impl::defaultness::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 157,679 ( 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] 157,405 ( 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] 157,382 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::qpath 157,325 ( 0.00%) ???:rustc_hir::intravisit::walk_pat::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 157,317 ( 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 157,186 ( 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] 156,951 ( 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 156,552 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 156,533 ( 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] 156,508 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_or_unification_node [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 156,480 ( 0.00%) ???:__tls_get_addr [/usr/lib/ld-linux-x86-64.so.2] 156,380 ( 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] 155,853 ( 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 155,251 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 154,891 ( 0.00%) ???:::parse_safety [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 154,731 ( 0.00%) ???:<&rustc_middle::ty::list::RawList<(), rustc_type_ir::canonical::CanonicalVarKind> as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 154,650 ( 0.00%) 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] 154,464 ( 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 154,280 ( 0.00%) ???:::flat_map_arm [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 153,954 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 153,748 ( 0.00%) ???:::check_tokens'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 153,591 ( 0.00%) ???:0x00000000000947c0 [/usr/lib/libc.so.6] 153,499 ( 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 153,471 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 153,378 ( 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] 153,194 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:::finish_grow 153,136 ( 0.00%) ???:rustc_ast::attr::mk_doc_comment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 152,985 ( 0.00%) ???:::imported_source_file::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 152,540 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 152,539 ( 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] 152,435 ( 0.00%) ???:rustc_hir::intravisit::walk_pat:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 152,418 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 152,286 ( 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] 151,822 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_expr::{closure#0}::{closure#0} [???] 151,660 ( 0.00%) ???:::visit_lifetime [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 151,250 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 151,017 ( 0.00%) ???:rustc_query_impl::query_impl::is_doc_hidden::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 150,964 ( 0.00%) ???:::to_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 150,929 ( 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 150,861 ( 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] 150,859 ( 0.00%) ???:::parse_borrowed_pointee [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 150,829 ( 0.00%) ???:::desugar_doc_comments::desugar_inner'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 150,046 ( 0.00%) ???:::visit_pat'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 149,932 ( 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:: 149,836 ( 0.00%) ???:::span_to_locations'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 149,788 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:::check_expr 149,728 ( 0.00%) ???:::expr_call_lang_item_fn [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 149,235 ( 0.00%) ???: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] 148,743 ( 0.00%) ???:::decode_span'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 148,389 ( 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] 148,352 ( 0.00%) ???:::visit_poly_trait_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 148,201 ( 0.00%) ???:::walk [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 148,010 ( 0.00%) ???:::source_callsite [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 147,863 ( 0.00%) ???:::check_crate'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 147,726 ( 0.00%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 147,528 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/wrong_self_convention.rs:::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 147,101 ( 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] 146,813 ( 0.00%) include/jemalloc/internal/mutex.h:tcache_bin_flush_small 146,774 ( 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 146,742 ( 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 146,613 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/loops/utils.rs:::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 146,575 ( 0.00%) include/jemalloc/internal/rtree.h:free_default 146,496 ( 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] 146,438 ( 0.00%) ???:>>::walk_ref [???] 145,941 ( 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] 145,899 ( 0.00%) ???:::node_type [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 145,768 ( 0.00%) src/emap.c:pa_alloc 145,712 ( 0.00%) ???:::visit_stmt'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 145,522 ( 0.00%) ???:>>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 145,493 ( 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> 145,300 ( 0.00%) ???:std::sys::env::unix::getenv [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 145,186 ( 0.00%) ???:::record_lifetime_use [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 145,058 ( 0.00%) ???:::visit_generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 144,695 ( 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] 144,636 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 144,586 ( 0.00%) ???:::visit_expr [???] 144,499 ( 0.00%) ???:> as rustc_data_structures::flat_map_in_place::FlatMapInPlace>>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[alloc::boxed::Box; 1]>>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 144,476 ( 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] 144,264 ( 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 144,263 ( 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] 144,123 ( 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}> 143,892 ( 0.00%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 143,878 ( 0.00%) ???:::check_case [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 143,575 ( 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] 143,535 ( 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] 143,480 ( 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] 142,967 ( 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] 142,830 ( 0.00%) ???:::parse_pat_tuple_struct [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 142,796 ( 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}> 142,540 ( 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] 142,524 ( 0.00%) ???:ioctl [/usr/lib/libc.so.6] 142,313 ( 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,288 ( 0.00%) ???:::flat_map_stmt'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 142,237 ( 0.00%) 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] 142,133 ( 0.00%) ???:::intern_const [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 142,107 ( 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 141,740 ( 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] 141,595 ( 0.00%) ???:::record_use'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 141,451 ( 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] 140,951 ( 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 140,934 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:clippy_utils::attrs::has_non_exhaustive_attr 140,905 ( 0.00%) ???:::new_imported_source_file [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 139,867 ( 0.00%) ???:::is_multiline [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 139,602 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/option_env_unwrap.rs:::check_expr 139,020 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 138,952 ( 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] 138,930 ( 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] 138,590 ( 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] 138,443 ( 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,386 ( 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] 138,042 ( 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] 138,034 ( 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] 137,955 ( 0.00%) ???:rustc_ast::visit::visit_stmts:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 137,665 ( 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] 137,485 ( 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 137,335 ( 0.00%) ???:rustc_ast::visit::visit_stmts:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 137,335 ( 0.00%) ???:rustc_ast::visit::visit_stmts:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 137,335 ( 0.00%) ???:rustc_ast::visit::visit_stmts:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 137,335 ( 0.00%) ???:rustc_ast::visit::visit_stmts:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 137,270 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 136,780 ( 0.00%) 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] 136,461 ( 0.00%) ???:::make_lang_item_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 136,378 ( 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] 136,022 ( 0.00%) ???:rustc_ast::visit::visit_field_defs::> [???] 135,780 ( 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] 135,434 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 135,356 ( 0.00%) ???:::path_ident [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 134,600 ( 0.00%) ???:::guess_print_mode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 134,476 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 134,463 ( 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] 134,429 ( 0.00%) ???:rustc_privacy::check_mod_privacy [???] 134,294 ( 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] 134,256 ( 0.00%) ???: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] 134,233 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_generic_param [???] 133,970 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/temporary_assignment.rs:::check_expr 133,818 ( 0.00%) ???:::visit_block'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 133,679 ( 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 133,665 ( 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 133,665 ( 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 133,589 ( 0.00%) ???:::name_lower [???] 133,368 ( 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] 133,336 ( 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] 133,329 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 133,290 ( 0.00%) ???:::hir_get_parent_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 133,152 ( 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] 132,933 ( 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] 132,904 ( 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,750 ( 0.00%) ???:::to_string_lossy [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 132,431 ( 0.00%) ???:::parse_single:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 132,304 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:clippy_utils::method_chain_args 132,303 ( 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] 132,248 ( 0.00%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 132,216 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:clippy_utils::method_chain_args 132,185 ( 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] 132,016 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:memchr::arch::x86_64::memchr::memchr_raw::find_avx2 131,925 ( 0.00%) ???:::meta_item_list [???] 131,887 ( 0.00%) ???:::is_conditionally_const::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 131,530 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/symbol.rs:::check_attribute 131,312 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_question_mark.rs:::check_expr 131,293 ( 0.00%) ???:::fully_expand_fragment'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 131,250 ( 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] 130,949 ( 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:::check_generics 130,862 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 130,762 ( 0.00%) ???:::parse_next_component_back [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 130,751 ( 0.00%) ???:::between [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 130,556 ( 0.00%) ???:rustc_trait_selection::traits::project::confirm_candidate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 130,506 ( 0.00%) /rust/deps/indexmap-2.14.0/src/inner/entry.rs:, rustc_type_ir::sty::Region>>::new [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 130,232 ( 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,041 ( 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] 129,871 ( 0.00%) /rust/deps/indexmap-2.14.0/src/inner.rs:, rustc_type_ir::sty::Region>>::insert_unique [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 129,862 ( 0.00%) ???:rustc_query_impl::query_impl::check_liveness::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 129,693 ( 0.00%) ???:::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 129,157 ( 0.00%) ???:::source_callee [???] 129,144 ( 0.00%) ???:::parent_callsite [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 128,732 ( 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 128,383 ( 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] 127,686 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/map_unit_fn.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 127,151 ( 0.00%) src/extent.c:tcache_bin_flush_small 126,957 ( 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] 126,849 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_path'2 [???] 126,781 ( 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] 126,724 ( 0.00%) ???: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] 126,603 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:::finish_grow 126,439 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/slow_vector_initialization.rs:::check_expr 126,314 ( 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] 126,132 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/escape.rs:::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 125,994 ( 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] 125,764 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 125,696 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:::check_expr_post 125,688 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 125,659 ( 0.00%) 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] 125,474 ( 0.00%) ???:__cxa_atexit [/usr/lib/libc.so.6] 125,450 ( 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 125,223 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::has_let_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 124,968 ( 0.00%) include/jemalloc/internal/tsd.h:malloc_default 124,693 ( 0.00%) ???:::resolve_macro_or_delegation_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 124,460 ( 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 124,397 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 124,305 ( 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 124,292 ( 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 124,292 ( 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 124,292 ( 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 124,292 ( 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 124,292 ( 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 124,292 ( 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 124,292 ( 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 124,292 ( 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 124,292 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/pointers_in_nomem_asm_block.rs:::check_expr 124,292 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_lints::operators::eq_op::check_assert 124,292 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_lints::operators::float_cmp::check_assert 124,260 ( 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 124,260 ( 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] 124,234 ( 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] 124,084 ( 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] 124,053 ( 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] 123,787 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::maybe_walk_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 123,759 ( 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] 123,416 ( 0.00%) ???:::visit_invoc_in_module [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 123,312 ( 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] 123,303 ( 0.00%) ???:::build_reduced_graph_for_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 123,253 ( 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] 123,127 ( 0.00%) ???:::parse_coroutine_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 122,960 ( 0.00%) ???: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] 122,726 ( 0.00%) /rust/deps/thin-vec-0.2.19/src/lib.rs:>::walk_ref'2 122,548 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 122,450 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 122,148 ( 0.00%) ???:::trait_def_id [???] 122,141 ( 0.00%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 122,137 ( 0.00%) ???:<[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] 121,843 ( 0.00%) ???:::walk::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 121,695 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_generic_args [???] 121,574 ( 0.00%) ???:rustc_metadata::foreign_modules::collect [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 121,529 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::get_def_id_availability [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 121,383 ( 0.00%) include/jemalloc/internal/bit_util.h:realloc 121,082 ( 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::> 121,078 ( 0.00%) ???:::visit_block'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 121,056 ( 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] 121,024 ( 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] 120,937 ( 0.00%) ???:::walk::<::could_be_never_pattern::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 120,936 ( 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 120,891 ( 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] 120,633 ( 0.00%) ???: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] 120,468 ( 0.00%) ???:::hir_owner_parent'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 120,262 ( 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] 120,245 ( 0.00%) ???:rustc_arena::outline::<::alloc_from_iter, ::lower_angle_bracketed_parameter_data::{closure#2}>>::{closure#0}, &mut [rustc_hir::hir::AssocItemConstraint]> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 120,170 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 120,036 ( 0.00%) ???: as rustc_ast::visit::Visitor>::visit_arm::{closure#0} [???] 119,986 ( 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] 119,509 ( 0.00%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex> as rustc_middle::query::caches::QueryCache>::for_each'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 119,464 ( 0.00%) src/thread_event.c:free_default 119,135 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::get::{closure#0}> as rustc_hir::intravisit::Visitor>::visit_expr'2 119,058 ( 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] 119,055 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 118,874 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 118,868 ( 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] 118,688 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 118,550 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:::meets 118,323 ( 0.00%) ???:::check_item [???] 118,078 ( 0.00%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 117,975 ( 0.00%) ???: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] 117,738 ( 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] 117,596 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 117,575 ( 0.00%) ???:realpath [/usr/lib/libc.so.6] 117,487 ( 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] 117,390 ( 0.00%) ???:::from_tokens'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 117,370 ( 0.00%) ???:rustc_query_impl::query_impl::lower_to_hir::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 117,000 ( 0.00%) ???:rustc_middle::ty::util::intrinsic_raw [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 116,876 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 116,633 ( 0.00%) ???:::find_by_ident_and_kind [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 116,614 ( 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> 116,614 ( 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> 116,614 ( 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> 116,426 ( 0.00%) ???:::lower_mod [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 116,335 ( 0.00%) include/jemalloc/internal/rtree.h:extent_try_coalesce_impl.llvm.9305427869391012685 115,994 ( 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::> 115,947 ( 0.00%) ???: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] 115,926 ( 0.00%) src/emap.c:ecache_evict 115,570 ( 0.00%) ???:rustc_hir::intravisit::walk_pat::>'2 [???] 115,419 ( 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> 115,400 ( 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 115,352 ( 0.00%) ???:::ensure_lines'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 115,337 ( 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 115,337 ( 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> 115,160 ( 0.00%) ???:::impl_or_trait_obligations [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 114,888 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/toplevel_ref_arg.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 114,756 ( 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 114,747 ( 0.00%) ???:rustc_ast_lowering::index_ast [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 114,742 ( 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 114,720 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_utils::attrs::has_non_exhaustive_attr 114,641 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/doc/include_in_doc_without_cfg.rs:::check_attributes 114,616 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::should_ignore [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 114,604 ( 0.00%) ???:rustc_attr_parsing::attributes::cfg::parse_name_value [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 114,497 ( 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 114,345 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/ptr/mod.rs:::check_body [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 114,198 ( 0.00%) src/thread_event.c:malloc_default 114,124 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs: as rustc_type_ir::fold::TypeFolder>::fold_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 114,102 ( 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] 113,951 ( 0.00%) ???:rustc_hir_analysis::check_crate'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 113,912 ( 0.00%) 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] 113,822 ( 0.00%) ???:::to_token_trees'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 113,433 ( 0.00%) ???:::resolve_doc_links'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 113,225 ( 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] 113,187 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unused_io_amount.rs:clippy_lints::unused_io_amount::should_lint [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 112,977 ( 0.00%) src/arena.c:tcache_bin_flush_small 112,960 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 112,909 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/doc/missing_headers.rs:clippy_lints::doc::missing_headers::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 112,397 ( 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 112,290 ( 0.00%) ???: as rustc_ast::visit::Visitor>::visit_generic_param::{closure#0} [???] 111,930 ( 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 111,927 ( 0.00%) ???:rustc_query_impl::execution::try_execute_query::>, true>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 111,921 ( 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 111,893 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_fn_decl [???] 111,877 ( 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,862 ( 0.00%) ???:rustc_ty_utils::layout::layout_of_uncached [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 111,708 ( 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] 111,688 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_fn:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 111,659 ( 0.00%) ???:::visit_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 111,285 ( 0.00%) ???:::visit_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 111,038 ( 0.00%) ???:::check_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 110,966 ( 0.00%) ???:::data_untracked [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 110,645 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/extra_unused_type_parameters.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 110,487 ( 0.00%) ???:::visit_generic_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 110,486 ( 0.00%) ???:::flat_map_field_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 110,279 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:clippy_utils::method_chain_args 110,072 ( 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] 110,041 ( 0.00%) ???:pulldown_cmark::scanners::scan_link_dest [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 109,701 ( 0.00%) ???:core::ptr::drop_glue::<[rustc_expand::mbe::macro_parser::NamedMatch]> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 109,538 ( 0.00%) ???:::advance_left [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 109,446 ( 0.00%) ???:rustc_query_impl::query_impl::mir_borrowck::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 109,363 ( 0.00%) ???:::lower_pat_mut::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 109,303 ( 0.00%) ???:::start_point [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 109,248 ( 0.00%) ???:>, (rustc_middle::query::erase::ErasedData<[u8; 2]>, rustc_middle::dep_graph::graph::DepNodeIndex))>>::reserve_rehash::<>, (rustc_middle::query::erase::ErasedData<[u8; 2]>, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::insert_unique::{closure#0}> [???] 109,037 ( 0.00%) ???:::name [???] 109,008 ( 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] 108,954 ( 0.00%) ???: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] 108,919 ( 0.00%) ???:::lazy::>, rustc_hash::FxBuildHasher>, &indexmap::map::IndexMap<(rustc_span::symbol::Symbol, rustc_hir::def::Namespace), core::option::Option>, rustc_hash::FxBuildHasher>>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 108,882 ( 0.00%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 108,830 ( 0.00%) ???:>>::walk_ref'2 [???] 108,812 ( 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] 107,975 ( 0.00%) /rust/deps/smallvec-1.15.1/src/lib.rs:::check_attributes 107,975 ( 0.00%) /rust/deps/smallvec-1.15.1/src/lib.rs:::check_attributes_post 107,730 ( 0.00%) ???:::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 107,580 ( 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] 107,499 ( 0.00%) ???:::flat_map_expr_field [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 107,124 ( 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 106,993 ( 0.00%) ???:rustc_query_impl::query_impl::check_unsafety::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 106,970 ( 0.00%) 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] 106,954 ( 0.00%) ???:::assemble_candidates_from_impls [???] 106,887 ( 0.00%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 106,887 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 106,887 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 106,876 ( 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] 106,855 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 106,605 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 106,600 ( 0.00%) ???:::filter_by_name_unhygienic [???] 106,208 ( 0.00%) /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] 106,178 ( 0.00%) ???:::walk:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 106,161 ( 0.00%) ???: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] 106,147 ( 0.00%) ???:__rustc::__rdl_dealloc [???] 106,042 ( 0.00%) ???:>::encode [???] 106,028 ( 0.00%) ???:::span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 105,987 ( 0.00%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 105,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/lib.rs:::check_expr 105,577 ( 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 105,556 ( 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::> 105,553 ( 0.00%) ???:rustc_hir::intravisit::walk_pat::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 105,482 ( 0.00%) ???:::visit_pat'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 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,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/lib.rs:::check_expr 105,224 ( 0.00%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memchr-2.8.2/src/arch/x86_64/memchr.rs:::check_attribute 105,224 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:::check_attribute 105,164 ( 0.00%) ???:rustc_ast::visit::visit_stmts::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 105,144 ( 0.00%) ???:rustc_ast::visit::visit_stmts::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 105,144 ( 0.00%) ???:rustc_ast::visit::visit_stmts::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 105,144 ( 0.00%) ???:rustc_ast::visit::visit_stmts::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 105,144 ( 0.00%) ???:rustc_ast::visit::visit_stmts::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 105,064 ( 0.00%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:<&mut clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0} as core::ops::function::FnMut<(&rustc_hir::hir::Attribute,)>>::call_mut 104,940 ( 0.00%) ???:::eq [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 104,745 ( 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] 104,657 ( 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 104,642 ( 0.00%) ???:::schedule_expn_data_for_encoding [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 104,249 ( 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] 104,204 ( 0.00%) ???:, rustc_hash::FxBuildHasher>>::insert_full [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 104,086 ( 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] 103,913 ( 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] 103,857 ( 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] 103,815 ( 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] 103,812 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_inside_always_const_context [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 103,507 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 103,486 ( 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:: 103,381 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/else_if_without_else.rs:::check_expr 103,350 ( 0.00%) ???: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] 103,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:clippy_lints::functions::must_use::check_impl_item 103,226 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 103,164 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 102,980 ( 0.00%) ???: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] 102,976 ( 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 102,976 ( 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 102,930 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 102,900 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 102,828 ( 0.00%) 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] 102,751 ( 0.00%) ???:::visit_generic_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 102,668 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 102,650 ( 0.00%) /rust/deps/pulldown-cmark-0.11.3/src/parse.rs:::check_attributes 102,647 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 102,568 ( 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 102,481 ( 0.00%) ???:>::tys::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 102,324 ( 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 102,324 ( 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 102,300 ( 0.00%) ???: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] 101,898 ( 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] 101,880 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 101,807 ( 0.00%) ???:rustc_hir::intravisit::walk_item:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 101,547 ( 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:: 101,484 ( 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] 101,411 ( 0.00%) ???:::lint_level_spec_at_node'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 101,287 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 101,117 ( 0.00%) ???:::lower_field_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 100,983 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:::check_fn 100,759 ( 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] 100,716 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_ty'2 [???] 100,693 ( 0.00%) ???:::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 100,491 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 100,482 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 100,452 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_ifs.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 100,415 ( 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] 100,182 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_pat::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 100,149 ( 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] 99,892 ( 0.00%) ???:::leak_check [???] 99,789 ( 0.00%) ???:::typeck_root_def_id_local [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 99,506 ( 0.00%) ???:::from_span_label [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 99,242 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eq_expr'2 99,230 ( 0.00%) ???:0x0000000000067b30 [/usr/lib/libc.so.6] 98,990 ( 0.00%) ???:rustc_query_impl::query_impl::check_transmutes::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 98,558 ( 0.00%) ???:::with_def_site_ctxt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 98,400 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 98,380 ( 0.00%) ???:::from_bytes_with_nul [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 98,376 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_generics [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 98,298 ( 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] 98,043 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 97,946 ( 0.00%) ???:::resolve_derives [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 97,910 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_pat::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 97,867 ( 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] 97,721 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:, rustc_type_ir::sty::Region>>::new 97,551 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/reserve_after_initialization.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 97,474 ( 0.00%) ???:0x0000000000040520 [/usr/lib/libc.so.6] 97,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:rustc_hir::intravisit::walk_fn::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 97,191 ( 0.00%) ???:::find_ancestor_inside [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 97,147 ( 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 97,125 ( 0.00%) ???:rustc_hir::intravisit::walk_pat::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 97,088 ( 0.00%) ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_serialize::serialize::Decodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 97,072 ( 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] 96,901 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_expr::::check::{closure#0}>>'2 96,893 ( 0.00%) ???:>::types_may_unify_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 96,853 ( 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] 96,830 ( 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] 96,705 ( 0.00%) ???:::parse_if_after_cond [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 96,420 ( 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] 96,349 ( 0.00%) ???:pulldown_cmark::parse::body_to_tag_end [???] 96,300 ( 0.00%) ???:termize::platform::unix::dimensions [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 96,278 ( 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] 96,220 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 96,139 ( 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] 95,952 ( 0.00%) ???:::meta [???] 95,622 ( 0.00%) include/jemalloc/internal/tsd_tls.h:malloc_default 95,616 ( 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] 95,436 ( 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] 95,355 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 95,355 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 95,149 ( 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] 95,103 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::check_body [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 95,078 ( 0.00%) ???:::to_token_trees [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 95,007 ( 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] 94,924 ( 0.00%) ???:::parent_module'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 94,802 ( 0.00%) ???:::def_key:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 94,641 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/misc_early/unneeded_wildcard_pattern.rs:::check_pat 94,476 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_impl_item::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 94,358 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 94,299 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:clippy_utils::macros::root_macro_call 94,220 ( 0.00%) ???:::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 94,090 ( 0.00%) ???:::parse_record_struct_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 94,060 ( 0.00%) ???:>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 94,034 ( 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] 94,029 ( 0.00%) ???:rustc_query_impl::query_impl::def_kind::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 93,936 ( 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] 93,869 ( 0.00%) ???:>::visit_clauses [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 93,802 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_pat::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 93,657 ( 0.00%) 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] 93,569 ( 0.00%) /rust/deps/smallvec-1.15.1/src/lib.rs:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::fold::TypeFoldable>::fold_with::> 93,513 ( 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] 93,352 ( 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] 93,172 ( 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] 93,100 ( 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] 93,085 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 93,029 ( 0.00%) ???: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] 93,027 ( 0.00%) ???:::is_descendant_of [???] 92,970 ( 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/avx2.rs:memchr::arch::x86_64::memchr::memchr_raw::find_avx2 92,826 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::is_mutable_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 92,727 ( 0.00%) ???:::collect_tokens::::parse_stmt_without_recovery::{closure#4}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 92,576 ( 0.00%) include/jemalloc/internal/atomic.h:ecache_evict 92,547 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 92,511 ( 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 92,507 ( 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] 92,451 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::generics_of [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 92,437 ( 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] 92,419 ( 0.00%) /rust/deps/rustc-hash-2.1.1/src/lib.rs:>::insert 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] 91,767 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/freeze.rs:::def_key:: 91,752 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::filter::Filter, core::slice::iter::Iter>, clippy_lints::unit_types::unit_arg::check::{closure#0}>>>::from_iter 91,624 ( 0.00%) ???:::parse_match_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 91,407 ( 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] 91,245 ( 0.00%) ???:>::from [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 91,234 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 90,915 ( 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] 90,847 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 90,833 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 90,819 ( 0.00%) ???:pulldown_cmark::parse::scan_link_label [???] 90,610 ( 0.00%) ???:::ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 90,426 ( 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] 90,341 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/redundant_allocation.rs:clippy_lints::types::redundant_allocation::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 90,251 ( 0.00%) ???:::has_typeck_results [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 90,229 ( 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] 90,176 ( 0.00%) ???:::allocate_cow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 90,112 ( 0.00%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memchr-2.8.2/src/arch/x86_64/memchr.rs:memchr::arch::x86_64::memchr::memchr_raw::find_avx2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 89,895 ( 0.00%) include/jemalloc/internal/tsd.h:pa_alloc 89,615 ( 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] 89,537 ( 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 89,492 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:, rustc_hash::FxBuildHasher> as core::iter::traits::collect::FromIterator<(rustc_span::def_id::LocalDefId, alloc::vec::Vec)>>::from_iter::, >::new::{closure#0}>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 89,450 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 89,207 ( 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] 89,177 ( 0.00%) ???:::poly_select::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 89,158 ( 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] 89,122 ( 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] 89,040 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_expr::'2 88,928 ( 0.00%) ???:::entire [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 88,746 ( 0.00%) ???:rustc_expand::mbe::transcribe::lockstep_iter_size'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 88,741 ( 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] 88,725 ( 0.00%) ???:>>>::set [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 88,570 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_expr 88,462 ( 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] 88,348 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_block'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 88,263 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 88,237 ( 0.00%) ???:>::call_once'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 88,169 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_variant_data [???] 88,150 ( 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 88,144 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs:clippy_utils::method_chain_args 88,138 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:>::insert 87,977 ( 0.00%) ???:>::decode'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 87,917 ( 0.00%) ???:::decode_syntax_context [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 87,902 ( 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] 87,896 ( 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] 87,868 ( 0.00%) ???:::parse_mod [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 87,644 ( 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:: 87,550 ( 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] 87,482 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_impl_item [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 87,462 ( 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 87,407 ( 0.00%) include/jemalloc/internal/thread_event.h:free_default 87,381 ( 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] 87,378 ( 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 87,200 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_lints::loops::while_let_on_iterator::check 87,182 ( 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] 87,160 ( 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 86,970 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs:::check_expr 86,904 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/or_fun_call.rs:clippy_lints::methods::or_fun_call::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 86,836 ( 0.00%) ???:::from_token [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 86,818 ( 0.00%) ???:rustc_hir_analysis::collect::resolve_bound_vars::object_lifetime_default [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 86,766 ( 0.00%) ???:::parent_module [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 86,566 ( 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] 86,510 ( 0.00%) src/emap.c:tcache_bin_flush_small 86,348 ( 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 86,305 ( 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 86,220 ( 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 86,220 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:::check_expr 86,079 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs:>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound), as core::iter::traits::collect::Extend<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound)>>::extend>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}>>::{closure#0}>::{closure#0}> 86,014 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unused_io_amount.rs:clippy_lints::unused_io_amount::check_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 86,000 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eq_expr 85,945 ( 0.00%) ???:::parse_expr_lit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 85,880 ( 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] 85,819 ( 0.00%) ???:::open_c [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 85,712 ( 0.00%) ???:::smart_resolve_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 85,712 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/asm_syntax.rs:::check_expr 85,695 ( 0.00%) ???:rustc_query_impl::execution::ensure_can_skip_execution::, rustc_middle::dep_graph::graph::DepNodeIndex>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 85,536 ( 0.00%) ???:rustc_ty_utils::common_traits::is_trait_raw [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 85,447 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 85,434 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/uninit_vec.rs:clippy_lints::uninit_vec::handle_uninit_vec_pair [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 85,388 ( 0.00%) ???:::lower_expr_if'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 85,350 ( 0.00%) include/jemalloc/internal/sz.h:pa_dalloc 85,197 ( 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 85,181 ( 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 85,181 ( 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 85,181 ( 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 85,143 ( 0.00%) ???:::cancel [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 85,069 ( 0.00%) /rust/deps/pulldown-cmark-0.11.3/src/tree.rs: as core::iter::traits::iterator::Iterator>::next 85,010 ( 0.00%) ???:::is_keyword_ahead [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 85,004 ( 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 85,004 ( 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 84,977 ( 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 84,792 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_pat::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 84,579 ( 0.00%) ???:::parse_use_tree'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 84,356 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/misnamed_getters.rs:clippy_lints::functions::misnamed_getters::check_fn [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 84,300 ( 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] 84,284 ( 0.00%) 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] 84,208 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 84,147 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 84,140 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 84,140 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 84,009 ( 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] 83,920 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 83,668 ( 0.00%) ???:::std_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 83,591 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 83,401 ( 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 83,336 ( 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] 83,163 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter.rs: as alloc::vec::spec_from_iter::SpecFromIter, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option>>>::from_iter [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 83,160 ( 0.00%) ???:::from_utf8_lossy [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 83,144 ( 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 83,133 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/visit.rs:rustc_ast::visit::walk_stmt::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 83,060 ( 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:: 82,800 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:clippy_utils::macros::first_node_in_macro:: 82,575 ( 0.00%) ???: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] 82,478 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 82,294 ( 0.00%) ???:::type_is_copy_modulo_regions [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 82,217 ( 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] 82,212 ( 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] 82,079 ( 0.00%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:::check_attributes 82,017 ( 0.00%) ???:::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 81,988 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 81,977 ( 0.00%) ???:> as rustc_data_structures::flat_map_in_place::FlatMapInPlace>>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[alloc::boxed::Box; 1]>>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 81,953 ( 0.00%) ???:>::try_fold_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 81,915 ( 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] 81,883 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 81,870 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/redundant_locals.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 81,862 ( 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] 81,837 ( 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] 81,714 ( 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 81,595 ( 0.00%) ???:rustc_builtin_macros::format::expand_format_args_impl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 81,568 ( 0.00%) ???:::adjust [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 81,539 ( 0.00%) ???:rustc_expand::mbe::macro_check::check_nested_occurrences'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 81,420 ( 0.00%) ???:::check_arm [???] 81,384 ( 0.00%) 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] 81,368 ( 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 81,237 ( 0.00%) ???:::as_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 81,196 ( 0.00%) ???:::visit_item_id_use_tree'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 81,185 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::reduce_exprkind [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 81,046 ( 0.00%) 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] 80,969 ( 0.00%) ???:::insert_field_idents [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 80,950 ( 0.00%) ???:::requires_monomorphization'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 80,949 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context/tls.rs:::check_expr 80,940 ( 0.00%) include/jemalloc/internal/rtree.h:emap_merge_prepare 80,887 ( 0.00%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 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,850 ( 0.00%) ???:::visit_body [???] 80,794 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:clippy_utils::is_expn_of 80,736 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:::check_ctxt 80,521 ( 0.00%) ???:::lower_pat_tuple [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 80,469 ( 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] 80,451 ( 0.00%) ???:::visit_variant_data [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 80,420 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 80,161 ( 0.00%) ???:::walk_::<::necessary_variants::{closure#0}>'2 [???] 80,157 ( 0.00%) ???: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] 80,096 ( 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] 80,090 ( 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,061 ( 0.00%) src/decay.c:tcache_bin_flush_small 80,015 ( 0.00%) ???:core::slice::sort::shared::smallsort::insert_tail::::sort_by_key<(core::cmp::Reverse, u128, u64), >::univariant_biased>::{closure#5}>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 79,987 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 79,784 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: 79,586 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_block::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 79,574 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/edition.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 79,574 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 79,311 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/symbol.rs:>::with::<::as_str::{closure#0}, &str> 79,311 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:>::with::<::as_str::{closure#0}, &str> 79,311 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:>::with::<::as_str::{closure#0}, &str> 79,290 ( 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 79,272 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/token.rs:::check_attributes 79,247 ( 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,162 ( 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 79,154 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs:::check_attributes 79,135 ( 0.00%) ???:::clear [???] 78,945 ( 0.00%) ???:::desugar_doc_comments::desugar_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 78,918 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:::check_attribute 78,918 ( 0.00%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:::check_attribute 78,882 ( 0.00%) ???:>::dying_next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 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,798 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:<&mut clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0} as core::ops::function::FnMut<(&rustc_hir::hir::Attribute,)>>::call_mut 78,798 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:<&mut clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0} as core::ops::function::FnMut<(&rustc_hir::hir::Attribute,)>>::call_mut 78,675 ( 0.00%) ???:>>::walk_ref'2 [???] 78,652 ( 0.00%) ???:>::flush_buf [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 78,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] 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,434 ( 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] 78,416 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::last_path_segment [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 78,368 ( 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::> 78,248 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/wrong_self_convention.rs:clippy_lints::methods::wrong_self_convention::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 78,206 ( 0.00%) ???:::grow_amortized [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 78,152 ( 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 78,096 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:clippy_utils::last_path_segment 78,094 ( 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,017 ( 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::> 77,803 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::emit_lint_if_under_msrv 77,654 ( 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,652 ( 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 77,482 ( 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::> 77,440 ( 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] 77,423 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_expr::'2 77,288 ( 0.00%) ???:::pad_integral::write_prefix [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 77,166 ( 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 77,136 ( 0.00%) ???:::check_block [???] 77,103 ( 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,095 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 77,011 ( 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] 76,860 ( 0.00%) ???:<&rustc_middle::ty::list::RawList<(), rustc_type_ir::canonical::CanonicalVarKind> as rustc_serialize::serialize::Decodable>::decode::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 76,814 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:rustc_hir::intravisit::walk_expr::::check::{closure#0}>>'2 76,672 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::eq_expr'2 76,667 ( 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] 76,637 ( 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 76,618 ( 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] 76,582 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/mixed_attributes_style.rs:>::insert 76,523 ( 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] 76,418 ( 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] 76,335 ( 0.00%) ???:::collect_bang [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 76,329 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 76,311 ( 0.00%) 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] 76,235 ( 0.00%) src/emap.c:extent_try_coalesce_impl.llvm.9305427869391012685 76,009 ( 0.00%) ???:::with_parent [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 75,994 ( 0.00%) ???:::new_import_decl [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 75,852 ( 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 75,763 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 75,749 ( 0.00%) ???: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] 75,673 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 75,665 ( 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::> 75,607 ( 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 75,502 ( 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 75,376 ( 0.00%) ???:::implicit_self [???] 75,213 ( 0.00%) include/jemalloc/internal/tcache_inlines.h:free_default 74,822 ( 0.00%) ???:::has_trivial_sizedness [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 74,806 ( 0.00%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 74,644 ( 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] 74,585 ( 0.00%) ???:rustc_hir::intravisit::walk_expr::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 74,577 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/no_effect.rs:clippy_lints::no_effect::reduce_expression [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 74,451 ( 0.00%) ???:>::tys::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 74,404 ( 0.00%) ???:core::ptr::drop_glue::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 74,292 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/rc_buffer.rs:clippy_lints::types::rc_buffer::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 74,248 ( 0.00%) ???:::find_library_crate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 74,130 ( 0.00%) ???:::add_annotation_to_file [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 74,130 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/vec_box.rs:clippy_lints::types::vec_box::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 74,045 ( 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 73,950 ( 0.00%) ???:::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 73,753 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_block::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 73,664 ( 0.00%) ???:rustc_hir::intravisit::walk_qpath::>'2 [???] 73,625 ( 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] 73,590 ( 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] 73,536 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path_segment [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 73,530 ( 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,451 ( 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] 73,402 ( 0.00%) ???:rustc_passes::diagnostic_items::all_diagnostic_items [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 73,371 ( 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:: 73,360 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:clippy_utils::trait_ref_of_method 73,356 ( 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] 73,203 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 73,179 ( 0.00%) ???:core::fmt::write'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 73,148 ( 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 73,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:<&str as core::str::pattern::Pattern>::is_contained_in 73,002 ( 0.00%) include/jemalloc/internal/cache_bin.h:free_default 72,906 ( 0.00%) ???:::intern_valtree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 72,898 ( 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] 72,730 ( 0.00%) ???:::kind [???] 72,690 ( 0.00%) ???:::lower_variant_data [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 72,562 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_methods 72,510 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/option_option.rs:clippy_lints::types::option_option::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 72,156 ( 0.00%) ???:::update [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 72,075 ( 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 71,930 ( 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] 71,838 ( 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] 71,761 ( 0.00%) ???:rustc_attr_parsing::attributes::cfg::eval_config_entry [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 71,687 ( 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 71,669 ( 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 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,566 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 71,544 ( 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:: 71,534 ( 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] 71,488 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_ty 71,480 ( 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] 71,436 ( 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 71,433 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 71,433 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 71,433 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 71,317 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:::check_pat 71,208 ( 0.00%) include/jemalloc/internal/edata.h:pac_decay_to_limit.llvm.9344053299937794623 71,065 ( 0.00%) ???: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] 71,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_block::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 71,019 ( 0.00%) 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] 70,953 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 70,726 ( 0.00%) ???: as rustc_ast::visit::Visitor>::visit_use_tree'2 [???] 70,651 ( 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] 70,553 ( 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] 70,429 ( 0.00%) ???:::local_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,375 ( 0.00%) ???:rustc_attr_parsing::context::ATTRIBUTE_PARSERS::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 70,216 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 69,973 ( 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] 69,827 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 69,769 ( 0.00%) src/emap.c:pa_dalloc 69,724 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::loops::never_loop::never_loop_expr'2 69,701 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}> as core::iter::traits::iterator::Iterator>::fold::<(), core::iter::traits::iterator::Iterator::for_each::call<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound), as core::iter::traits::collect::Extend<(rustc_span::def_id::DefId, clippy_lints::needless_maybe_sized::Bound)>>::extend>, clippy_lints::needless_maybe_sized::type_param_bounds::{closure#0}>>, ::check_generics::{closure#0}>, ::check_generics::{closure#1}>>::{closure#0}>::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 69,690 ( 0.00%) ???:0x00000000000a07c0 [/usr/lib/libc.so.6] 69,617 ( 0.00%) /rust/deps/indexmap-2.14.0/src/inner.rs:>::insert_full 69,486 ( 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] 69,476 ( 0.00%) ???:> as rustc_ast::visit::Visitable>>::visit [???] 69,466 ( 0.00%) ???:::span [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 69,222 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:::get_def_id_availability 69,202 ( 0.00%) ???:> as rustc_ast::visit::Visitable>>::visit [???] 69,187 ( 0.00%) ???:::extract_arg_details [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 69,135 ( 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] 69,135 ( 0.00%) ???:rustc_query_impl::query_impl::explicit_clauses_of::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 69,061 ( 0.00%) ???:::hash_owner_nodes::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 69,012 ( 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] 68,965 ( 0.00%) 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] 68,909 ( 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] 68,859 ( 0.00%) ???:::render'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 68,698 ( 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 68,657 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_expr_unadjusted [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 68,619 ( 0.00%) ???:::visit_generic_params'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 68,576 ( 0.00%) ???:::parse_pat_tuple_or_parens [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 68,549 ( 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] 68,538 ( 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] 68,447 ( 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,382 ( 0.00%) src/pac.c:pa_alloc 68,367 ( 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] 68,365 ( 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 68,276 ( 0.00%) /rust/deps/indexmap-2.14.0/src/inner.rs:>::insert_full 68,126 ( 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,116 ( 0.00%) ???:::lower_expr_range [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 68,083 ( 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] 68,080 ( 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 68,057 ( 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 68,053 ( 0.00%) ???:::collect_invocations'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 68,045 ( 0.00%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memchr-2.8.2/src/vector.rs:memchr::arch::x86_64::memchr::memchr_raw::find_avx2 68,005 ( 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] 67,965 ( 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] 67,810 ( 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] 67,773 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 67,723 ( 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] 67,719 ( 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] 67,701 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_local:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 67,684 ( 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] 67,682 ( 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] 67,668 ( 0.00%) ???:>>::upcast_from [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 67,536 ( 0.00%) ???:> as rustc_ast::visit::Visitable>>::visit [???] 67,436 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/no_effect.rs:::check_expr 67,423 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::check_item_kind 67,398 ( 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::> 67,385 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/hir/map.rs:clippy_utils::macros::first_node_in_macro:: 67,295 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::swap_remove:: 67,192 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 67,158 ( 0.00%) ???:::pop_all [???] 67,129 ( 0.00%) ???:::assoc_parent [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 67,115 ( 0.00%) ???:::make_canonicalized_query_response:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 67,034 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:::instantiate_bound_regions_with_erased:: 67,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/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] 67,023 ( 0.00%) src/extent.c:pa_dalloc 67,005 ( 0.00%) ???:::visit_method_receiver_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,979 ( 0.00%) ???:::maybe_report_lifetime_uses [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,976 ( 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] 66,855 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cell.rs:::qpath 66,855 ( 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 66,825 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/owned_cow.rs:clippy_lints::types::owned_cow::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 66,798 ( 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,767 ( 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] 66,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:::check_pat 66,647 ( 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 66,588 ( 0.00%) ???:::process_obligation [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,545 ( 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] 66,528 ( 0.00%) ???:::lower_poly_trait_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,508 ( 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] 66,501 ( 0.00%) ???:::new_local_module [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,291 ( 0.00%) ???:::hygienic_eq [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,282 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 66,281 ( 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 66,235 ( 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 66,164 ( 0.00%) src/pac.c:tcache_bin_flush_small 66,141 ( 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 66,130 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:::visit_pat 66,095 ( 0.00%) ???:rustc_query_impl::plumbing::verify_query_key_hashes_inner::>>>, rustc_middle::query::erase::ErasedData<[u8; 8]>>>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 65,974 ( 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] 65,973 ( 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 65,929 ( 0.00%) ???:::visit_method_receiver_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 65,866 ( 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] 65,778 ( 0.00%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 65,686 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 65,598 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 65,511 ( 0.00%) ???:::from_span_full::::macro_backtrace::{closure#0}>>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 65,484 ( 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] 65,480 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:>::with::<::with::expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 65,429 ( 0.00%) include/jemalloc/internal/arena_inlines_b.h:free_default 65,418 ( 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 65,370 ( 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] 65,329 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 65,295 ( 0.00%) ???:rustc_target::spec::add_link_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 65,283 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::fn_kind_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 65,180 ( 0.00%) include/jemalloc/internal/ph.h:edata_cache_put 65,121 ( 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] 65,067 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/no_effect.rs:clippy_lints::no_effect::has_no_effect [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 64,977 ( 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 64,958 ( 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] 64,915 ( 0.00%) ???:::visit_pat'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 64,669 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/neg_multiply.rs:::check_expr 64,660 ( 0.00%) ???:0x000000000d99a2f0 [???] 64,616 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::associated_item_def_ids [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 64,593 ( 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] 64,590 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::combine_branches [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 64,382 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:>::insert 64,158 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:clippy_utils::attrs::parse_attrs::<::push_attrs::{closure#0}, rustc_hir::hir::Attribute> 64,077 ( 0.00%) ???:rustc_attr_parsing::attributes::cfg::parse_cfg_entry [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 64,008 ( 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,947 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/loops/needless_range_loop.rs:::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 63,930 ( 0.00%) src/tcache.c:realloc 63,804 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::::{closure#0}>>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 63,712 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 63,636 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/box_collection.rs:clippy_lints::types::box_collection::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 63,545 ( 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] 63,510 ( 0.00%) ???:rustc_attr_parsing::attributes::cfg::parse_cfg_attr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 63,447 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:::get::{closure#0}> as rustc_hir::intravisit::Visitor>::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 63,306 ( 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::> 63,302 ( 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 63,288 ( 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] 63,196 ( 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 63,184 ( 0.00%) ???:::defaultness [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 63,123 ( 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] 63,109 ( 0.00%) ???:::emit_diagnostic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 63,047 ( 0.00%) ???:::add_early_lint [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 62,983 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 62,965 ( 0.00%) include/jemalloc/internal/edata.h:extent_try_coalesce_impl.llvm.9305427869391012685 62,945 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/duplicated_attributes.rs:clippy_lints::attrs::duplicated_attributes::check_duplicated_attr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 62,928 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::is_assert_arg [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 62,880 ( 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] 62,876 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:clippy_utils::attrs::parse_attrs::<::pop_attrs::{closure#0}, rustc_hir::hir::Attribute> 62,738 ( 0.00%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 62,681 ( 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 62,632 ( 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] 62,603 ( 0.00%) ???:>::call_once'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 62,536 ( 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] 62,529 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:::check_arm [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 62,520 ( 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] 62,513 ( 0.00%) src/thread_event.c:realloc 62,483 ( 0.00%) ???:::find_match [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 62,478 ( 0.00%) ???:::visit_pat'2 [???] 62,477 ( 0.00%) ???:>::destroy [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 62,475 ( 0.00%) ???:::recover_vcs_conflict_marker [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 62,398 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/control/tag.rs:>::insert 62,348 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs: as rustc_type_ir::fold::TypeFolder>::fold_ty'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 62,339 ( 0.00%) ???:0x0000000000176b40 [/usr/lib/libc.so.6] 62,312 ( 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] 62,236 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/returns/needless_return_with_question_mark.rs:clippy_lints::returns::needless_return_with_question_mark::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 62,234 ( 0.00%) ???:::from_attr_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 62,146 ( 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 62,146 ( 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 62,146 ( 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 62,146 ( 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 62,146 ( 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 62,146 ( 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 62,146 ( 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] 62,146 ( 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 62,146 ( 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 62,146 ( 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 62,146 ( 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 62,146 ( 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 62,146 ( 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 62,146 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:::check_expr 62,052 ( 0.00%) include/jemalloc/internal/bit_util.h:tcache_bin_flush_small 61,993 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:rustc_hir::intravisit::walk_expr::::check::{closure#0}>>'2 61,989 ( 0.00%) ???:::meta_kind [???] 61,804 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,764 ( 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] 61,762 ( 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::::expr_usage_requires_vec::{closure#0}, ()>>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 61,745 ( 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] 61,682 ( 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:: 61,680 ( 0.00%) ???:::replace_region [???] 61,671 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,568 ( 0.00%) ???:::lower_expr_assign [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,533 ( 0.00%) ???:rustc_query_impl::execution::try_execute_query::>, true>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,485 ( 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] 61,440 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs: as core::iter::traits::collect::Extend>::extend::>> 61,427 ( 0.00%) ???:annotate_snippets::renderer::render::style_substitution_highlights'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,425 ( 0.00%) ???:::expr_lang_item_type_relative [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,384 ( 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] 61,335 ( 0.00%) ???:::visit_pat'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,291 ( 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] 61,236 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/cfg_not_test.rs:::check_attribute 61,137 ( 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] 61,115 ( 0.00%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 61,015 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/collections/btree/search.rs:::visit_expr'2 60,992 ( 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> 60,941 ( 0.00%) ???:::visit_pat'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 60,930 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 60,929 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 60,911 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/rc_mutex.rs:clippy_lints::types::rc_mutex::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 60,885 ( 0.00%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 60,856 ( 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] 60,844 ( 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] 60,743 ( 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 60,728 ( 0.00%) ???:::collect_invocations [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 60,708 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_expr::>'2 60,649 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_must_use_candidate [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 60,471 ( 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] 60,431 ( 0.00%) ???:::clone'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 60,417 ( 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] 60,400 ( 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] 60,309 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 60,276 ( 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] 60,248 ( 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 60,096 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 60,058 ( 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] 60,037 ( 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 59,895 ( 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] 59,885 ( 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] 59,806 ( 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] 59,725 ( 0.00%) ???:::new [???] 59,711 ( 0.00%) ???: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] 59,653 ( 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] 59,647 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/filter.rs:clippy_lints::unit_types::unit_arg::check 59,575 ( 0.00%) ???:>::super_fold_with:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 59,565 ( 0.00%) ???:rustc_ty_utils::common_traits::is_copy_raw [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 59,558 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_lints::unit_types::unit_cmp::check 59,478 ( 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 59,350 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_nonzero_get.rs:clippy_lints::needless_nonzero_get::nonzero_get [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 59,345 ( 0.00%) ???:::until [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 59,343 ( 0.00%) ???:core::slice::memchr::memrchr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 59,275 ( 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 59,213 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::check_stmt 59,156 ( 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] 58,940 ( 0.00%) ???:::expand::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 58,781 ( 0.00%) ???:::list_from_tokens'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 58,765 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 58,717 ( 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 58,703 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:::check_attribute 58,686 ( 0.00%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 58,681 ( 0.00%) ???:::hir_impl_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 58,629 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:rustc_hir::intravisit::walk_expr::'2 58,610 ( 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] 58,603 ( 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] 58,595 ( 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] 58,582 ( 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 58,572 ( 0.00%) ???:::expect_one_of [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 58,572 ( 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] 58,570 ( 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 58,542 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_stmt::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 58,472 ( 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] 58,392 ( 0.00%) ???: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] 58,170 ( 0.00%) ???:rustc_expand::mbe::macro_check::check_ops_is_prefix [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 58,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/hir.rs:clippy_lints::functions::must_use::check_impl_item 58,104 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_qpath [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 58,076 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::check_if_try_match [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 58,053 ( 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 57,968 ( 0.00%) ???:::has_typeck_results'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 57,921 ( 0.00%) include/jemalloc/internal/edata.h:extent_record 57,896 ( 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] 57,895 ( 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 57,865 ( 0.00%) ???:::qpath_lang_item [???] 57,798 ( 0.00%) ???:::check_ident [???] 57,703 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::check_crate 57,670 ( 0.00%) ???:::trait_ref_and_own_args_for_alias [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 57,647 ( 0.00%) ???:::is_automatically_derived [???] 57,636 ( 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 57,624 ( 0.00%) include/jemalloc/internal/sz.h:ecache_evict 57,589 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 57,546 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/iter.rs:>::next_back [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 57,451 ( 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] 57,385 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_nested_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 57,376 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:::instantiate_bound_regions_with_erased::> 57,361 ( 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] 57,344 ( 0.00%) ???:::expr_call_global [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 57,336 ( 0.00%) ???:::new [???] 57,273 ( 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] 57,257 ( 0.00%) ???:::visit_generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 57,199 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 57,192 ( 0.00%) ???:::visit_variant [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 57,132 ( 0.00%) ???:::opt_field_index [???] 57,056 ( 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] 57,014 ( 0.00%) include/jemalloc/internal/edata.h:realloc 56,995 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_local:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 56,980 ( 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] 56,959 ( 0.00%) ???:::collect_field [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 56,873 ( 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::> 56,812 ( 0.00%) ???:::lower_generic_bound_predicate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 56,717 ( 0.00%) ???:::maybe_resolve_crate'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 56,688 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs: as alloc::vec::spec_from_iter::SpecFromIter, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option>>>::from_iter 56,662 ( 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] 56,631 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/attr/mod.rs:clippy_lints::non_expressive_names::do_check 56,595 ( 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] 56,570 ( 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] 56,522 ( 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] 56,516 ( 0.00%) ???:rustc_query_impl::query_impl::def_kind::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 56,488 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/attr/mod.rs:clippy_lints::attrs::deprecated_cfg_attr::check 56,477 ( 0.00%) ???:rustc_query_impl::query_impl::is_copy_raw::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 56,475 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:clippy_lints::functions::duplicate_underscore_argument::check 56,471 ( 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] 56,420 ( 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] 56,383 ( 0.00%) ???:> as rustc_data_structures::flat_map_in_place::FlatMapInPlace>>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[alloc::boxed::Box; 1]>>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 56,260 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/attr/mod.rs:clippy_lints::attrs::deprecated_cfg_attr::check_clippy 56,160 ( 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] 56,079 ( 0.00%) ???:>>::collect_and_apply::, <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_serialize::serialize::Decodable>::decode::{closure#0}>, ::mk_args_from_iter, <&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_serialize::serialize::Decodable>::decode::{closure#0}>, rustc_middle::ty::generic_args::GenericArg>::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 56,038 ( 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] 56,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_ty:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 55,996 ( 0.00%) ???:0x0000000000094850 [/usr/lib/libc.so.6] 55,990 ( 0.00%) ???:rustc_hir::intravisit::walk_pat::>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,875 ( 0.00%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,806 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/impl_trait_in_params.rs:::check_impl_item 55,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] 55,724 ( 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 55,724 ( 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 55,724 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::attrs::deprecated_cfg_attr::check 55,724 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::attrs::deprecated_cfg_attr::check_clippy 55,646 ( 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 55,580 ( 0.00%) ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::inherent::Tys>::inputs [???] 55,567 ( 0.00%) ???:::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,562 ( 0.00%) ???:>::add_id'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,552 ( 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] 55,533 ( 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] 55,518 ( 0.00%) ???:::argument [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,473 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,447 ( 0.00%) ???:::visit_pat'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,420 ( 0.00%) ???:rustc_hir::intravisit::walk_expr::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,380 ( 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 55,335 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,319 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 55,312 ( 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 55,312 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::Param; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,255 ( 0.00%) ???:::cmp [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,205 ( 0.00%) ???:rustc_ast::mut_visit::walk_fn:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,174 ( 0.00%) ???:::insert_field_visibilities_local [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,147 ( 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] 55,141 ( 0.00%) ???:rustc_query_impl::execution::try_execute_query::>, true>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,136 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/collapsible_match.rs:clippy_lints::matches::collapsible_match::check_match [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 55,117 ( 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] 55,090 ( 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 55,033 ( 0.00%) ???:::visit_fn'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 55,016 ( 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] 54,981 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 54,975 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 54,937 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/vec_init_then_push.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 54,867 ( 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] 54,841 ( 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 54,824 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:clippy_lints::unwrap::collect_unwrap_info::inner [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 54,765 ( 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] 54,739 ( 0.00%) ???:rustc_hir::intravisit::walk_expr::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 54,675 ( 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] 54,634 ( 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] 54,610 ( 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] 54,580 ( 0.00%) ???:rustc_resolve::rustdoc::prepare_to_doc_link_resolution'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 54,506 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/sugg.rs:clippy_utils::sugg::has_enclosing_paren:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 54,503 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_methods 54,478 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 54,437 ( 0.00%) ???:rustc_span::hygiene::walk_chain [???] 54,303 ( 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] 54,301 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 54,226 ( 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] 54,128 ( 0.00%) include/jemalloc/internal/bit_util.h:eset_remove 53,857 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_lints::unwrap::extract_local 53,729 ( 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] 53,686 ( 0.00%) ???: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] 53,648 ( 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 53,599 ( 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 53,578 ( 0.00%) ???:::visit_attribute [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 53,566 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 53,555 ( 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] 53,549 ( 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] 53,538 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_stmt 53,498 ( 0.00%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:>::with::<::with::is_descendant_of::{closure#0}>::{closure#0}, bool> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 53,362 ( 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] 53,168 ( 0.00%) ???:::parse_use_tree_glob_or_nested'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 53,155 ( 0.00%) ???:::walk::<::resolve_pattern_inner::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 53,116 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 53,010 ( 0.00%) ???:::with_span_pos [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 52,974 ( 0.00%) src/eset.c:tcache_bin_flush_small 52,937 ( 0.00%) ???:rustc_hir::intravisit::walk_stmt:: [???] 52,896 ( 0.00%) ???:::visit_use_tree'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 52,868 ( 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] 52,848 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/symbol.rs:::check_attributes 52,848 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/accum.rs:::check_attributes 52,821 ( 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] 52,699 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::visit_pat 52,627 ( 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] 52,612 ( 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 52,612 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:::check_attribute 52,612 ( 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] 52,532 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/symbol.rs:<&mut clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0} as core::ops::function::FnMut<(&rustc_hir::hir::Attribute,)>>::call_mut 52,532 ( 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:<&mut clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0} as core::ops::function::FnMut<(&rustc_hir::hir::Attribute,)>>::call_mut 52,404 ( 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] 52,390 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:rustc_hir::intravisit::walk_expr::'2 52,290 ( 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 52,269 ( 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] 52,230 ( 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] 52,180 ( 0.00%) ???:::parse_meta_seq_top [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 52,179 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 52,125 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_block::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 52,027 ( 0.00%) ???:::parse_generics [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 51,982 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_local::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 51,875 ( 0.00%) ???:rustc_query_impl::query_impl::def_span::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 51,849 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/reserve_after_initialization.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 51,834 ( 0.00%) ???:>>::walk_ref [???] 51,788 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 51,788 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 51,759 ( 0.00%) ???:::get [???] 51,740 ( 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 51,636 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/symbol.rs:::visit_pat 51,619 ( 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] 51,598 ( 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] 51,576 ( 0.00%) ???:rustc_target::spec::crt_objects::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 51,564 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_to_owned.rs:clippy_lints::methods::unnecessary_to_owned::is_cow_into_owned [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 51,517 ( 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] 51,502 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 51,488 ( 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_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next 51,468 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_pat 51,368 ( 0.00%) ???:>::reserve [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 51,360 ( 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] 51,360 ( 0.00%) src/sz.c:tcache_bin_flush_small 51,300 ( 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] 51,266 ( 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 51,222 ( 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:>::sub:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 51,199 ( 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] 51,053 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/ref_option.rs:clippy_lints::functions::ref_option::check_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 51,016 ( 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 50,941 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/control/tag.rs:>::insert 50,935 ( 0.00%) ???:::next [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 50,920 ( 0.00%) include/jemalloc/internal/ph.h:extent_record 50,898 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 50,863 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 50,862 ( 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 50,792 ( 0.00%) ???:::next'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 50,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/hir.rs:::check_body 50,616 ( 0.00%) ???:>>::walk_ref [???] 50,429 ( 0.00%) ???:>::reserve [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 50,398 ( 0.00%) ???:::visit_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 50,318 ( 0.00%) src/bitmap.c:malloc_default 50,304 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 50,299 ( 0.00%) ???:::expect_lifetime [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 50,256 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<(rustc_hir_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] 50,215 ( 0.00%) ???:::item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 50,127 ( 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] 50,113 ( 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] 50,060 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:::check_body 49,885 ( 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}> [???] 49,871 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/manual_hash_one.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 49,870 ( 0.00%) ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::inherent::Tys>::output [???] 49,850 ( 0.00%) include/jemalloc/internal/atomic.h:pa_dalloc 49,805 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:::next_match 49,794 ( 0.00%) ???:::eat_path_sep [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 49,681 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:clippy_utils::ty::get_field_def_id_by_name 49,674 ( 0.00%) ???:getopts::find_opt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 49,570 ( 0.00%) ???:::features [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 49,564 ( 0.00%) ???:::parse_meta_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 49,522 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:clippy_lints::lifetimes::could_use_elision 49,511 ( 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] 49,500 ( 0.00%) ???:::{closure#1} as core::ops::function::FnOnce<(rustc_middle::ty::context::TyCtxt, rustc_middle::dep_graph::dep_node::DepNode, rustc_middle::dep_graph::serialized::SerializedDepNodeIndex, rustc_middle::dep_graph::graph::DepNodeIndex)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 49,448 ( 0.00%) ???:::check_expr_post [???] 49,320 ( 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] 49,312 ( 0.00%) ???:__strtoul_internal [/usr/lib/libc.so.6] 49,278 ( 0.00%) ???:::allocate_link [???] 49,247 ( 0.00%) ???:::encode_query_value::<&rustc_data_structures::unord::UnordSet> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 49,186 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/cmp.rs:::check_fn 49,168 ( 0.00%) ???:::visit_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 49,113 ( 0.00%) ???:>::process_obligations:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 48,990 ( 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} 48,968 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_methods 48,963 ( 0.00%) ???:rustc_expand::mbe::macro_check::check_binders'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 48,906 ( 0.00%) ???:::emit_diagnostic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 48,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_block::::check::{closure#0}>>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 48,865 ( 0.00%) ???:::check_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 48,830 ( 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] 48,757 ( 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] 48,754 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::eq 48,634 ( 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 48,602 ( 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_decl:: 48,568 ( 0.00%) ???:>::reserve_rehash::::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 48,542 ( 0.00%) ???:>::decode'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 48,537 ( 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] 48,528 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::get_vec_init_kind [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 48,492 ( 0.00%) src/sz.c:eset_remove 48,464 ( 0.00%) ???:createX86MCAsmInfo(llvm::MCRegisterInfo const&, llvm::Triple const&, llvm::MCTargetOptions const&) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 48,284 ( 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::> 48,185 ( 0.00%) ???:::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] 48,160 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_nested_body'2 [???] 48,066 ( 0.00%) ???:::clone::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 48,025 ( 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] 48,020 ( 0.00%) ???:::visit_expr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,980 ( 0.00%) ???:rustc_query_impl::plumbing::try_load_from_disk::, rustc_middle::ty::util::AlwaysRequiresDrop>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,940 ( 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] 47,876 ( 0.00%) include/jemalloc/internal/extent.h:ecache_evict 47,863 ( 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] 47,773 ( 0.00%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,690 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,648 ( 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] 47,647 ( 0.00%) ???:>::compress::<>::process_obligations::{closure#1}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,644 ( 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] 47,634 ( 0.00%) /rust/deps/indexmap-2.14.0/src/inner/entry.rs:>::new [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 47,574 ( 0.00%) ???:::emit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,557 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:::with_source_text::::{closure#0}> 47,514 ( 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] 47,478 ( 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 47,471 ( 0.00%) ???:::new_with_messages [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,378 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/cmp.rs:::check 47,343 ( 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] 47,324 ( 0.00%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,296 ( 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] 47,292 ( 0.00%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,226 ( 0.00%) ???:::expand_cfg_attr_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,212 ( 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] 47,211 ( 0.00%) ???:::parse_unspanned_seq::, ::parse_ty_tuple_or_parens::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,185 ( 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] 47,145 ( 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:: 47,123 ( 0.00%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 47,027 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:clippy_utils::in_automatically_derived 47,001 ( 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] 46,895 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/manual_let_else.rs:::check_stmt 46,845 ( 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] 46,836 ( 0.00%) ???:::define_local [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 46,817 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:::visit_pat 46,752 ( 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_suggestion_with_style::<&str, alloc::string::String> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 46,654 ( 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] 46,539 ( 0.00%) ???:>::super_fold_with::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 46,534 ( 0.00%) ???:>::encode [???] 46,507 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::methods::unnecessary_to_owned::check 46,465 ( 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] 46,458 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 46,458 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/chars_cmp_with_unwrap.rs:clippy_lints::methods::chars_cmp_with_unwrap::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 46,454 ( 0.00%) ???:::check_args_compatible_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 46,416 ( 0.00%) ???:::with_normalized [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 46,401 ( 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] 46,371 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_pat::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 46,324 ( 0.00%) ???:::get_or_insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 46,315 ( 0.00%) ???:rustc_query_impl::query_impl::object_lifetime_default::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] 46,236 ( 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 46,210 ( 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] 46,198 ( 0.00%) ???:::pad'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 46,098 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::Stmt; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 46,083 ( 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] 46,082 ( 0.00%) ???:::resolve_visibility [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 46,039 ( 0.00%) ???:::visit_generic_arg'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 46,035 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/not_unsafe_ptr_arg_deref.rs:::check_fn 46,030 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 45,950 ( 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] 45,886 ( 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] 45,864 ( 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] 45,851 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 45,851 ( 0.00%) ???:rustc_session::config::dep_tracking::stable_hash [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 45,838 ( 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] 45,830 ( 0.00%) ???:::walk::<::could_be_never_pattern::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 45,642 ( 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 45,546 ( 0.00%) ???:::is_path_start [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 45,475 ( 0.00%) ???:::parse_pat_struct [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 45,474 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/infallible_destructuring_match.rs:clippy_lints::matches::infallible_destructuring_match::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 45,410 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:::check_block 45,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] 45,300 ( 0.00%) ???:rustc_query_impl::query_impl::module_children::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 45,266 ( 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] 45,245 ( 0.00%) ???:::visit_item_id_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 45,140 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/graph.rs:clippy_utils::trait_ref_of_method 45,125 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:::check_expr 45,056 ( 0.00%) ???:::apply_pattern_bindings [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 45,054 ( 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] 45,047 ( 0.00%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 45,032 ( 0.00%) ???:std::sys::env::unix::getenv::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,987 ( 0.00%) ???:0x0000000000040c70 [/usr/lib/libc.so.6] 44,940 ( 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] 44,814 ( 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 44,725 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,725 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,725 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,712 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,600 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,583 ( 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] 44,543 ( 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] 44,533 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/let_underscore.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 44,505 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:clippy_utils::is_expn_of 44,479 ( 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] 44,456 ( 0.00%) ???:rustc_middle::dep_graph::graph::hash_result::<&rustc_hir::diagnostic_items::DiagnosticItems> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,443 ( 0.00%) ???:::parse_seq_to_before_end::::parse_meta_item::{closure#3}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,360 ( 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] 44,310 ( 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] 44,310 ( 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] 44,247 ( 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 44,218 ( 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] 44,162 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::check_expr 44,160 ( 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 44,129 ( 0.00%) ???:rustc_expand::mbe::transcribe::lockstep_iter_size [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 44,055 ( 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] 44,042 ( 0.00%) ???:>>::walk_ref [???] 44,011 ( 0.00%) ???:rustc_query_impl::query_impl::impl_trait_header::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] 43,958 ( 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] 43,953 ( 0.00%) ???:::drop [???] 43,884 ( 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] 43,855 ( 0.00%) ???:)>>::call_once'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,844 ( 0.00%) ???:::visit_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,842 ( 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}> 43,816 ( 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] 43,802 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:::def_key:: 43,749 ( 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_ 43,724 ( 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] 43,667 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_expr::>'2 43,660 ( 0.00%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,652 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,634 ( 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 43,522 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::get:: 43,513 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/hygiene.rs: as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find_map::check<(rustc_span::hygiene::ExpnId, rustc_span::hygiene::ExpnData), clippy_utils::macros::MacroCall, &mut clippy_utils::macros::macro_backtrace::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 43,460 ( 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] 43,438 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/mod.rs:::check_impl_item 43,435 ( 0.00%) include/jemalloc/internal/rtree.h:extent_record 43,418 ( 0.00%) ???:::flat_map_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,366 ( 0.00%) ???:::walk::<::check_consistent_bindings::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,321 ( 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] 43,316 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/set.rs:clippy_lints::attrs::mixed_attributes_style::check 43,286 ( 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] 43,260 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,254 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/chars_cmp.rs:clippy_lints::methods::chars_cmp::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 43,215 ( 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] 43,212 ( 0.00%) ???:>>::from [???] 43,196 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_expr::'2 43,187 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/context.rs:clippy_utils::fn_def_id_with_node_args 43,168 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,160 ( 0.00%) ???:::from_inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,152 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/spec_from_iter_nested.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::chain::Chain, core::slice::iter::Iter>>>::from_iter [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 43,147 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:::check_fn 43,147 ( 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_fn 43,110 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:::check_expr 43,110 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:::check_expr 43,082 ( 0.00%) ???:::opt_item_name [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,065 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/lock.rs:>::with::::data::{closure#0}>::{closure#0}, rustc_span::SpanData> 43,038 ( 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 43,036 ( 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] 43,023 ( 0.00%) ???:::require_lang_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 43,008 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,979 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::insert::::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 42,946 ( 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 42,944 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::current [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 42,910 ( 0.00%) /rust/deps/scoped-tls-1.0.1/src/lib.rs:::visit_pat 42,836 ( 0.00%) ???:::def_key [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,762 ( 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] 42,738 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:rustc_hir::intravisit::walk_expr::>'2 42,694 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::fn_sig [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,640 ( 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 42,618 ( 0.00%) ???:::build_reduced_graph_for_external_crate_res::{closure#2} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,575 ( 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] 42,527 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,526 ( 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] 42,518 ( 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:: 42,495 ( 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] 42,474 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,443 ( 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] 42,411 ( 0.00%) ???:::hygienic_eq'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,405 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,395 ( 0.00%) ???:::candidate_from_obligation_no_cache'2 [???] 42,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/hygiene.rs:clippy_utils::macros::root_macro_call 42,383 ( 0.00%) ???:::decode_expn_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,348 ( 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::inline_always::check 42,315 ( 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 42,192 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:::check_ctxt 42,164 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::reserve_rehash::::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 42,147 ( 0.00%) ???:::alloc_from_iter::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,146 ( 0.00%) ???:>>::or_default [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 42,081 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 42,061 ( 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}> [???] 41,985 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_pat:: 41,964 ( 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] 41,946 ( 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] 41,853 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_qpath::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 41,719 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs: as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::traits::iterator::Iterator::find_map::check<(rustc_span::hygiene::ExpnId, rustc_span::hygiene::ExpnData), clippy_utils::macros::MacroCall, &mut clippy_utils::macros::macro_backtrace::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 41,668 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_late_init.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 41,667 ( 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] 41,643 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:>::walk_mut'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 41,595 ( 0.00%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 41,565 ( 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] 41,434 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 41,403 ( 0.00%) ???:::parse_pat_fields::{closure#3} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 41,318 ( 0.00%) ???:rustc_builtin_macros::deriving::clone::expand_deriving_clone::{closure#2} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 41,280 ( 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] 41,249 ( 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] 41,225 ( 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 41,178 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_stmt 41,096 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/implicit_clone.rs:clippy_lints::methods::implicit_clone::is_clone_like [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 41,078 ( 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:::{closure#0}> as rustc_errors::diagnostic::Diagnostic<()>>::into_diag 41,038 ( 0.00%) ???:::choose_generics_over_qpath [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 41,030 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 40,920 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/source.rs:::check_fn 40,905 ( 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] 40,842 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:>::handle_inline_pass1 40,834 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::eq_expr 40,815 ( 0.00%) ???:open [/usr/lib/libc.so.6] 40,813 ( 0.00%) ???:rustc_hir::intravisit::walk_pat::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 40,789 ( 0.00%) ???:>::insert_full [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 40,779 ( 0.00%) ???:::check_param [???] 40,776 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_pat'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 40,757 ( 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] 40,756 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 40,544 ( 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] 40,531 ( 0.00%) ???:::to_lowercase [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 40,525 ( 0.00%) ???:rustc_query_impl::query_impl::inferred_outlives_of::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 40,496 ( 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] 40,484 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs: as core::iter::traits::iterator::Iterator>::try_fold::flatten::, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0} 40,484 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:, clippy_utils::macros::first_node_macro_backtrace::{closure#0}> as core::iter::traits::iterator::Iterator>::try_fold::<(), >::iter_try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, as core::iter::traits::iterator::Iterator>::try_fold::flatten, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow> 40,410 ( 0.00%) ???:rustc_expand::mbe::macro_rules::compile_declarative_macro [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 40,402 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::visit_expr'2 40,257 ( 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 40,148 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sharded.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 40,148 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::entry::::{closure#0}, indexmap::inner::get_hash::{closure#0}> 40,131 ( 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] 40,110 ( 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] 39,978 ( 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] 39,975 ( 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 39,946 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/numeric_arithmetic.rs:::check_body 39,924 ( 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:::should_ignore 39,918 ( 0.00%) include/jemalloc/internal/extent.h:pa_dalloc 39,877 ( 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] 39,835 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::::get::{closure#0}>>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 39,822 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/misc.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 39,820 ( 0.00%) ???:::fmt [???] 39,814 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/nonstandard_macro_braces.rs:::check_mac [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 39,788 ( 0.00%) ???:, rustc_middle::dep_graph::graph::DepNodeIndex))>>::reserve_rehash::<, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::insert_unique::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,764 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::filter::Filter, core::slice::iter::Iter>, clippy_lints::unit_types::unit_arg::check::{closure#0}>>>::from_iter 39,713 ( 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 39,685 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::qpath 39,683 ( 0.00%) ???:rustc_hir_analysis::check::region::resolve_block'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,676 ( 0.00%) include/jemalloc/internal/mutex.h:ecache_evict 39,634 ( 0.00%) ???:::break_two_token_op [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,599 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 39,570 ( 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] 39,489 ( 0.00%) ???:::parse_use_tree_glob_or_nested [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,468 ( 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] 39,420 ( 0.00%) include/jemalloc/internal/sz.h:extent_record 39,395 ( 0.00%) ???:>::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,390 ( 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] 39,357 ( 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:::expr 39,342 ( 0.00%) ???:::collect [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,340 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::unit_types::unit_cmp::check 39,268 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_stmt::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 39,256 ( 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 39,254 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unit_types/mod.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 39,247 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/control/tag.rs:>::entry::::{closure#0}, indexmap::inner::get_hash::{closure#0}> 39,240 ( 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] 39,155 ( 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 39,100 ( 0.00%) ???:::parse_pat_ident_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,096 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:::clone [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 39,094 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::walk_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 39,023 ( 0.00%) ???:::visit_nested_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 39,022 ( 0.00%) ???:::splice_lines::push_trailing'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,997 ( 0.00%) ???:)>>::reserve_rehash::, core::hash::BuildHasherDefault>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,944 ( 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] 38,927 ( 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 38,906 ( 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] 38,856 ( 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 38,798 ( 0.00%) ???:)>, rustc_middle::query::erase::ErasedData<[u8; 32]>> 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] 38,775 ( 0.00%) ???:>>>::get::<&rustc_metadata::rmeta::decoder::CrateMetadata> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,770 ( 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] 38,750 ( 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 38,750 ( 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:: 38,712 ( 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:::eq_expr'2 38,680 ( 0.00%) ???: as alloc::vec::spec_from_iter_nested::SpecFromIterNested>>::from_iter [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,680 ( 0.00%) ???:pulldown_cmark::scanners::unescape::<&str> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,676 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:<&mut clippy_lints::manual_clamp::is_two_if_pattern::{closure#0} as core::ops::function::FnMut<((clippy_lints::manual_clamp::MaybeBorrowedStmtKind, clippy_lints::manual_clamp::MaybeBorrowedStmtKind),)>>::call_mut [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 38,671 ( 0.00%) ???:>::relate:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,632 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_else_clause [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 38,619 ( 0.00%) ???:core::ptr::drop_glue::>>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,601 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/mod.rs:::check_pat 38,592 ( 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 38,510 ( 0.00%) ???:::is_inhabited_from [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,412 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 38,399 ( 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] 38,358 ( 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 38,334 ( 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] 38,332 ( 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 38,298 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/unicode/unicode_data.rs:::trim_start_matches::<::is_whitespace> 38,276 ( 0.00%) ???:::check_pat_post [???] 38,262 ( 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:: 38,238 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/profiling.rs:::check_expr 38,226 ( 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] 38,144 ( 0.00%) ???:> as rustc_middle::ty::codec::RefDecodable>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,139 ( 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] 38,130 ( 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 38,097 ( 0.00%) ???:)>>::call_once'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 38,065 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::qpath_search_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 38,045 ( 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 38,034 ( 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] 38,009 ( 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] 37,950 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,884 ( 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] 37,884 ( 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] 37,884 ( 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] 37,864 ( 0.00%) ???:::parse_meta_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,851 ( 0.00%) ???:rustc_ty_utils::representability::params_in_repr_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,804 ( 0.00%) ???:rustc_errors::emitter::detect_confusion_type [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,798 ( 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::check_doc::> 37,763 ( 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 37,715 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/x86/sse2.rs:::check_pat 37,707 ( 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] 37,669 ( 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] 37,654 ( 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 37,604 ( 0.00%) ???:::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,545 ( 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] 37,530 ( 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 37,494 ( 0.00%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.15.0/src/tuple_impl.rs:, clippy_lints::manual_clamp::block_stmt_with_last::{closure#0}>, core::option::IntoIter>, (clippy_lints::manual_clamp::MaybeBorrowedStmtKind, clippy_lints::manual_clamp::MaybeBorrowedStmtKind)> as core::iter::traits::iterator::Iterator>::next [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 37,469 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,466 ( 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] 37,436 ( 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] 37,397 ( 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] 37,386 ( 0.00%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/pa.c:pa_dalloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 37,372 ( 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] 37,323 ( 0.00%) ???:::write_str [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,307 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,275 ( 0.00%) ???:rustc_query_impl::query_impl::attrs_for_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] 37,207 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,180 ( 0.00%) ???:>::extend_deduped::>, >::new>, >::skip_norm_wip>>, >::elaborate::{closure#1}>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,156 ( 0.00%) ???:::check_pat'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 37,127 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/range.rs:::next_match 37,072 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/linked_list.rs:clippy_lints::types::linked_list::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 37,055 ( 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] 37,034 ( 0.00%) ???:pulldown_cmark::parse::scan_reference [???] 37,000 ( 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] 36,997 ( 0.00%) ???:rustc_query_impl::query_impl::visibility::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,978 ( 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] 36,954 ( 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] 36,872 ( 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] 36,839 ( 0.00%) ???:annotate_snippets::renderer::source_map::as_substr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,765 ( 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] 36,756 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,711 ( 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] 36,677 ( 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] 36,629 ( 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_ty:: 36,588 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:>::insert 36,585 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:::get::{closure#0}> as rustc_hir::intravisit::Visitor>::visit_expr'2 36,576 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:::check_pat 36,560 ( 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 36,540 ( 0.00%) ???:::missing_semi_from_binop [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,538 ( 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 36,533 ( 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] 36,456 ( 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] 36,327 ( 0.00%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,312 ( 0.00%) ???:::is_from_async_await [???] 36,302 ( 0.00%) include/jemalloc/internal/sz.h:calloc 36,288 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/ref_option.rs:clippy_lints::functions::ref_option::check_fn_sig [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 36,287 ( 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] 36,269 ( 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] 36,261 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,250 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,236 ( 0.00%) ???:rustc_ast::visit::walk_fn:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,222 ( 0.00%) ???:, rustc_resolve::Used)>>::reserve_rehash::, rustc_resolve::Used, rustc_hash::FxBuildHasher>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,156 ( 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] 36,123 ( 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] 36,098 ( 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 36,098 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_expr::'2 36,063 ( 0.00%) ???:::_join [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 36,034 ( 0.00%) ???:rustc_builtin_macros::deriving::clone::cs_clone::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,935 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs: as rustc_hir::intravisit::Visitor>::visit_expr 35,924 ( 0.00%) ???:<() as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,855 ( 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] 35,795 ( 0.00%) ???:std::sys::fs::metadata [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,787 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::get::{closure#0}> as rustc_hir::intravisit::Visitor>::visit_expr 35,756 ( 0.00%) ???:::name_value_from_tokens [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,749 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/implied_bounds_in_impls.rs:::check_ty 35,708 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/index.rs:::check_fn 35,656 ( 0.00%) ???:::check_tokens'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,642 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_stmt 35,625 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,619 ( 0.00%) ???:)>>::call_once'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,557 ( 0.00%) ???:::in_derive_expansion [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,525 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::visit_pat'2 35,517 ( 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] 35,448 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:clippy_lints::casts::needless_type_cast::check 35,441 ( 0.00%) ???:>::super_fold_with::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,420 ( 0.00%) ???:rustc_lint::levels::shallow_lint_levels_on'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,415 ( 0.00%) ???:>::reserve_rehash::>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,415 ( 0.00%) ???:>::reserve_rehash::, rustc_middle::middle::privacy::EffectiveVisibility>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,390 ( 0.00%) ???:>>::walk_ref [???] 35,383 ( 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] 35,380 ( 0.00%) ???:::const_eval_poly [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,357 ( 0.00%) ???:::visit_block'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,354 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:rustc_hir::intravisit::walk_path::> 35,345 ( 0.00%) ???:::check_snake_case [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,339 ( 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] 35,335 ( 0.00%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, core::result::Result<&rustc_middle::traits::specialization_graph::Graph, rustc_span::ErrorGuaranteed>>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,318 ( 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] 35,286 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,252 ( 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 35,152 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::check_expr 35,143 ( 0.00%) ???:::parse_if_after_cond'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 35,132 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:>::walk_mut'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 35,112 ( 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] 34,890 ( 0.00%) ???:rustc_ast::mut_visit::walk_fn:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,853 ( 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 34,741 ( 0.00%) ???:::to_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,709 ( 0.00%) ???:::variant_with_id [???] 34,703 ( 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] 34,682 ( 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 34,668 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,667 ( 0.00%) ???:::get_variant [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,553 ( 0.00%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, true>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,516 ( 0.00%) ???:rustc_query_impl::query_impl::lookup_stability::invoke_provider_fn::__rust_begin_short_backtrace'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,496 ( 0.00%) ???:::visit_attribute [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,454 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::expr_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 34,428 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/combined_late_pass.rs:::check_attribute [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 34,427 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::hash_expr'2 34,421 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_path [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 34,398 ( 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] 34,370 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::if_sequence [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 34,309 ( 0.00%) ???:::start_point'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,293 ( 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} 34,290 ( 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] 34,276 ( 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:>::push_suggestion [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 34,242 ( 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] 34,229 ( 0.00%) ???:::ty_is_opaque_future [???] 34,197 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,177 ( 0.00%) ???:::parse_inner_attributes [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,160 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,123 ( 0.00%) ???:::add_import::{closure#0}'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,078 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,046 ( 0.00%) ???:>::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 34,028 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/sty.rs:::check_expr 34,021 ( 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:: 33,934 ( 0.00%) ???:::from_inner'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,923 ( 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 33,873 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/local.rs:::visit_pat 33,849 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:clippy_utils::macros::first_node_in_macro:: 33,826 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:::check_block 33,826 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:::check_block_post 33,813 ( 0.00%) ???:rustc_query_impl::execution::try_execute_query::)>, rustc_middle::query::erase::ErasedData<[u8; 32]>>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,751 ( 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] 33,744 ( 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] 33,729 ( 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 33,718 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:>::swap_remove:: 33,638 ( 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] 33,635 ( 0.00%) ???:::visit_nested_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,613 ( 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] 33,610 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs:clippy_lints::doc::doc_suspicious_footnotes::check 33,609 ( 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: 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> 33,608 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:rustc_hir::intravisit::walk_expr::>'2 33,592 ( 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] 33,540 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/control/tag.rs:>::entry::::{closure#0}, indexmap::inner::get_hash::{closure#0}> 33,518 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,500 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:clippy_utils::source::get_source_range 33,480 ( 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 33,419 ( 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}> 33,401 ( 0.00%) ???:::clone'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,397 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,378 ( 0.00%) ???:>::reserve [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,362 ( 0.00%) ???:rustc_lint::impl_trait_overcaptures::check_fn [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,350 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/fmt/mod.rs:<&str as core::fmt::Display>::fmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 33,325 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:clippy_lints::casts::needless_type_cast::collect_binding_from_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 33,254 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::docs_link [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 33,218 ( 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] 33,215 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:clippy_lints::unwrap::extract_local 33,185 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/char/methods.rs:clippy_utils::str_utils::to_camel_case 33,155 ( 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] 33,091 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/query/inner.rs:::check_expr 33,084 ( 0.00%) ???:::visit_path_segment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 33,050 ( 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] 33,041 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:::{closure#0}> as rustc_errors::diagnostic::Diagnostic<()>>::into_diag [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 33,022 ( 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] 32,924 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:::visit_branch [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 32,914 ( 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 32,914 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,911 ( 0.00%) ???:0x00000000000162d0 [/usr/lib/ld-linux-x86-64.so.2] 32,902 ( 0.00%) ???:::visit_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,899 ( 0.00%) include/jemalloc/internal/extent.h:tcache_bin_flush_small 32,848 ( 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:: 32,808 ( 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] 32,792 ( 0.00%) ???:std::string::_Rep::_M_refdata() [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,766 ( 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 32,766 ( 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 32,728 ( 0.00%) ???:rustc_query_impl::query_impl::lookup_stability::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,693 ( 0.00%) ???:rustc_query_impl::query_impl::type_of::invoke_provider_fn::__rust_begin_short_backtrace'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,655 ( 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] 32,610 ( 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:: 32,593 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,587 ( 0.00%) ???:>::reserve_one_unchecked [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,572 ( 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] 32,557 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_ty_alias [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 32,516 ( 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 32,497 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,485 ( 0.00%) ???:, ::create_struct_patterns::{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] 32,390 ( 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] 32,256 ( 0.00%) ???:>, ::create_struct_patterns::{closure#0}::{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] 32,243 ( 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] 32,215 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,210 ( 0.00%) ???:::visit_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,200 ( 0.00%) ???:rustc_query_impl::execution::try_execute_query::>, true>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 32,184 ( 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] 32,112 ( 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:::eq_expr 32,074 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 32,058 ( 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] 32,051 ( 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 31,960 ( 0.00%) ???:::inhabited_predicate [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,958 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:::visit_pat'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 31,926 ( 0.00%) ???:::annotated_lines'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,876 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::get::{closure#0}> as rustc_hir::intravisit::Visitor>::visit_expr'2 31,875 ( 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] 31,860 ( 0.00%) ???:::prepare_to_combine'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,839 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/cmp.rs:::visit_pat'2 31,807 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/intrinsics/mod.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: 31,794 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 31,781 ( 0.00%) ???:rustc_trait_selection::traits::normalize_param_env_or_error'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,776 ( 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] 31,746 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:rustc_hir::intravisit::walk_block::> 31,717 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:::check_param 31,641 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,630 ( 0.00%) ???:::visit_param_bound [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,605 ( 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 31,568 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/let_with_type_underscore.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 31,556 ( 0.00%) ???:::get_locales [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,543 ( 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 31,522 ( 0.00%) ???:>::swap_remove:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,509 ( 0.00%) ???:std::env::var::inner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,500 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,496 ( 0.00%) ???:::assemble_candidates_from_impls::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,472 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:rustc_hir::intravisit::walk_expr::'2 31,454 ( 0.00%) ???:rustc_span::hygiene::register_expn_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,421 ( 0.00%) ???:rustc_builtin_macros::deriving::debug::show_substructure::expr_for_field [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,416 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/control/bitmask.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: 31,405 ( 0.00%) include/jemalloc/internal/mutex.h:pa_dalloc 31,385 ( 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] 31,368 ( 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 31,353 ( 0.00%) ???:<::anonymize_bound_vars::Anonymize as rustc_middle::ty::fold::BoundVarReplacerDelegate>::replace_region [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,328 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_impl_item:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 31,320 ( 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 31,310 ( 0.00%) ???:::clone'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,305 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:clippy_lints::methods::unnecessary_to_owned::check 31,296 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested, clippy_lints::manual_clamp::block_stmt_with_last::{closure#0}>, core::option::IntoIter>, (clippy_lints::manual_clamp::MaybeBorrowedStmtKind, clippy_lints::manual_clamp::MaybeBorrowedStmtKind)>, clippy_lints::manual_clamp::is_two_if_pattern::{closure#0}>>>::from_iter 31,292 ( 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 31,290 ( 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] 31,289 ( 0.00%) ???:::alloc_from_iter::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,254 ( 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] 31,232 ( 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 31,203 ( 0.00%) ???:<[rustc_hir::hir::GenericBound] 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] 31,199 ( 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 31,194 ( 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] 31,175 ( 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] 31,125 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_ty::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 31,094 ( 0.00%) include/jemalloc/internal/extent.h:extent_try_coalesce_impl.llvm.9305427869391012685 31,081 ( 0.00%) ???:>::walk_mut [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,080 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,070 ( 0.00%) ???:::check_stack [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 31,066 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/doc/lazy_continuation.rs:clippy_lints::doc::check_doc::> 31,031 ( 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 31,027 ( 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] 30,999 ( 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:::should_ignore 30,945 ( 0.00%) ???:::inhabited_predicate'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,881 ( 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 30,858 ( 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] 30,819 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::visit_expr'2 30,816 ( 0.00%) ???:::emit_messages_default [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,806 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::::get::{closure#0}>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 30,795 ( 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] 30,760 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::Param; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,750 ( 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] 30,734 ( 0.00%) /rust/deps/indexmap-2.14.0/src/inner.rs:>::insert_unique [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 30,681 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,661 ( 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 30,646 ( 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] 30,639 ( 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 30,617 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/slow_vector_initialization.rs:::check_stmt 30,608 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/chain.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::chain::Chain, core::slice::iter::Iter>>>::from_iter 30,590 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,576 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 30,560 ( 0.00%) ???:>::univariant_biased::>::{closure#5} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,504 ( 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 30,430 ( 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:::sub::<&str> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 30,386 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,380 ( 0.00%) ???:rustc_hir::intravisit::walk_stmt::'2 [???] 30,356 ( 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 30,355 ( 0.00%) ???:::trait_of_assoc'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,306 ( 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 30,302 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_nested_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,299 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:rustc_hir::intravisit::walk_expr::'2 30,279 ( 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::doc::check_doc::> 30,272 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/write/mod.rs:::check_item 30,269 ( 0.00%) ???:::implied_target_features [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,244 ( 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] 30,234 ( 0.00%) ???:core::ptr::drop_glue::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,230 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::insert_full 30,182 ( 0.00%) ???:::visit_qpath'2 [???] 30,156 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/alloc.rs:clippy_utils::attrs::parse_attrs::<::pop_attrs::{closure#0}, rustc_hir::hir::Attribute> 30,156 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs:::get::{closure#0}> as rustc_hir::intravisit::Visitor>::visit_expr'2 30,152 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unit_types/let_unit_value.rs:::check_local 30,149 ( 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] 30,132 ( 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:::expr 30,126 ( 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 30,090 ( 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] 30,078 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/nonstandard_macro_braces.rs:::check_stmt [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 30,068 ( 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::inline_always::check 30,061 ( 0.00%) ???:::visit_fn [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 30,017 ( 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 30,008 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_pat::> 30,000 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:>::reserve_rehash::::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,950 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/collections/btree/node.rs:, alloc::collections::btree::node::marker::Edge>>::insert_recursing::>::insert_entry::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,946 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_utils::get_expr_use_site 29,932 ( 0.00%) ???:::walk_::<::is_never_pattern::{closure#0}>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,923 ( 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] 29,904 ( 0.00%) ???:>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,895 ( 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] 29,893 ( 0.00%) ???:::check_item [???] 29,831 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::check_item 29,825 ( 0.00%) ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results [???] 29,820 ( 0.00%) ???:::next_node_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,731 ( 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] 29,723 ( 0.00%) ???:::check_item_post [???] 29,693 ( 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] 29,676 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_final_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,666 ( 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] 29,651 ( 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 29,646 ( 0.00%) ???:::parse_item_enum [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,634 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/higher.rs:::parse [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,609 ( 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 29,608 ( 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 29,602 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_ty'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,595 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_local:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,540 ( 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 29,532 ( 0.00%) include/jemalloc/internal/pai.h:pa_alloc 29,518 ( 0.00%) ???:::effective_visibility_diagnostic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,483 ( 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] 29,469 ( 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] 29,440 ( 0.00%) ???:::opt_span_lint:: [???] 29,434 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/mod.rs:::check_block 29,432 ( 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 29,430 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,426 ( 0.00%) ???:::next_back [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,423 ( 0.00%) include/jemalloc/internal/tsd.h:free_default 29,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:core::ptr::drop_glue::> 29,375 ( 0.00%) ???:::is_lang_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,364 ( 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 29,324 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::insert_full 29,317 ( 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] 29,314 ( 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 29,281 ( 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::loops::never_loop::never_loop_expr'2 29,235 ( 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 29,172 ( 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] 29,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/span_encoding.rs:clippy_lints::operators::cmp_owned::check_op 29,142 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:clippy_lints::doc::check_doc::> 29,094 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::for_defined_ty [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 29,052 ( 0.00%) ???:llvm::cl::opt >::~opt() [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 29,040 ( 0.00%) ???:::scan_string [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,040 ( 0.00%) ???:isatty [/usr/lib/libc.so.6] 29,040 ( 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] 29,034 ( 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] 29,012 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 29,001 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:rustc_hir::intravisit::walk_arm::> 28,992 ( 0.00%) ???:::is_raw_guess [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,980 ( 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 28,976 ( 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::check_proc_macro::span_matches_pat 28,955 ( 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::> 28,954 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,953 ( 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] 28,934 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::make_projection::helper [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 28,912 ( 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] 28,910 ( 0.00%) ???:::parse_full_stmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,886 ( 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] 28,875 ( 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:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 28,864 ( 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] 28,857 ( 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_crate 28,850 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/attr/mod.rs:clippy_utils::attrs::check_clippy_attr:: 28,850 ( 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_attribute 28,850 ( 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_attribute 28,850 ( 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_attribute 28,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:::check_attribute 28,850 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/utils/attr_collector.rs:::check_attribute 28,838 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:::check_expr 28,830 ( 0.00%) ???:::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,803 ( 0.00%) ???:, usize)>>::reserve_rehash::, usize, rustc_hash::FxBuildHasher>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,799 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_block 28,789 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::check_impl_item 28,787 ( 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 28,768 ( 0.00%) ???:core::slice::sort::shared::smallsort::bidirectional_merge::::sort_by_key<&core::option::Option, , rustc_middle::ty::assoc::AssocItem> as core::iter::traits::collect::FromIterator<(core::option::Option, rustc_middle::ty::assoc::AssocItem)>>::from_iter, rustc_ty_utils::assoc::associated_items::{closure#0}>, ::new, rustc_ty_utils::assoc::associated_items::{closure#0}>>::{closure#0}>>::{closure#0}>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,759 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/nonstandard_macro_braces.rs:::check_mac_def::check_ts'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 28,756 ( 0.00%) ???:::parse_attr_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,755 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:::check_expr 28,707 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/misc_early/redundant_at_rest_pattern.rs:clippy_lints::misc_early::redundant_at_rest_pattern::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 28,706 ( 0.00%) ???:::default [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,671 ( 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] 28,663 ( 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:: 28,593 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_block 28,586 ( 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] 28,576 ( 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] 28,569 ( 0.00%) include/jemalloc/internal/tsd_tls.h:free_default 28,566 ( 0.00%) ???:::expand [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,560 ( 0.00%) ???:::visit_fn [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,531 ( 0.00%) ???:)>>::call_once'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,522 ( 0.00%) src/bitmap.c:realloc 28,487 ( 0.00%) ???:::visit_generic_args'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,482 ( 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 28,440 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/iter.rs:::next [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 28,404 ( 0.00%) ???:>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,399 ( 0.00%) ???:::expand_cfg_attr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,394 ( 0.00%) ???:rustc_ast::visit::walk_fn:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,390 ( 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 28,388 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::module_children [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,368 ( 0.00%) ???:annotate_snippets::renderer::render::maybe_anonymized'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,354 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map/entry.rs:::instantiate_bound_regions::::instantiate_bound_regions_with_erased::{closure#0}>::{closure#0} 28,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.rs:::check_block 28,292 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/traits.rs:::check_expr 28,287 ( 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:: 28,234 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_utils::check_proc_macro::expr_search_pat::expr_search_pat_inner'2 28,226 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 28,218 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,181 ( 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 28,179 ( 0.00%) ???:::visit_impl_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,176 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unnested_or_patterns.rs:::visit_pat [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 28,159 ( 0.00%) ???:rustc_ty_utils::representability::params_in_repr'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,096 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 28,092 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/count.rs:::visit_pat 28,065 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:core::ptr::drop_glue:: 28,036 ( 0.00%) ???:::asyncness [???] 28,030 ( 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] 28,018 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::get_field_def_id_by_name [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 28,013 ( 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::loops::never_loop::never_loop_block'2 27,998 ( 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] 27,976 ( 0.00%) ???:::parse_item_struct [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,775 ( 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:: 27,744 ( 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 27,737 ( 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:: 27,720 ( 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] 27,712 ( 0.00%) ???:::construct [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,691 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,653 ( 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] 27,603 ( 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 27,570 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_local::::check::{closure#0}>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 27,550 ( 0.00%) ???:::is_positional [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,506 ( 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 27,472 ( 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 27,469 ( 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] 27,444 ( 0.00%) src/sz.c:pa_dalloc 27,433 ( 0.00%) ???:::push [???] 27,432 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/operators/numeric_arithmetic.rs:::check_body_post 27,426 ( 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 27,410 ( 0.00%) ???:rustc_query_impl::query_impl::erase_and_anonymize_regions_ty::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,340 ( 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] 27,308 ( 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 27,305 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:::check_block_post 27,282 ( 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] 27,266 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,266 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/cognitive_complexity.rs:rustc_hir::intravisit::walk_arm::::check::{closure#0}>> 27,224 ( 0.00%) include/jemalloc/internal/atomic.h:malloc_default 27,160 ( 0.00%) ???:rustc_passes::stability::check_mod_unstable_api_usage [???] 27,136 ( 0.00%) ???:::maybe_recover_trailing_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 27,106 ( 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] 27,084 ( 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 27,084 ( 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 27,073 ( 0.00%) ???:llvm::DenseMapBase, llvm::detail::DenseMapPair >, llvm::MCRegister, int, llvm::DenseMapInfo, llvm::detail::DenseMapPair >::moveFrom(llvm::DenseMap, llvm::detail::DenseMapPair >&) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 27,072 ( 0.00%) include/jemalloc/internal/thread_event.h:calloc 27,060 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/levels.rs:::check_item 27,060 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint/src/levels.rs:::check_item_post 27,056 ( 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] 27,050 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/cognitive_complexity.rs:rustc_hir::intravisit::walk_stmt::::check::{closure#0}>>'2 27,033 ( 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:: 27,017 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/control/tag.rs:::check_body 27,017 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/match_wild_err_arm.rs:clippy_lints::matches::match_wild_err_arm::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 27,006 ( 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] 26,995 ( 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 26,981 ( 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:::instantiate_bound_regions_with_erased::> 26,962 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/structural_impls.rs:>::super_fold_with::>'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,962 ( 0.00%) ???:rustc_attr_parsing::attributes::cfg::parse_cfg [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,954 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_utils::macros::first_node_in_macro:: 26,915 ( 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 26,915 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/type_complexity.rs:::check_ty 26,880 ( 0.00%) ???:::type_is_copy_modulo_regions [???] 26,872 ( 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] 26,840 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/attr/version.rs:::emit_lint_if_under_msrv 26,835 ( 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 26,789 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::eq_expr'2 26,784 ( 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] 26,784 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:::check_fn 26,757 ( 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 26,733 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/methods/unwrap_expect_used.rs:clippy_lints::methods::unwrap_expect_used::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,727 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_arm::> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,714 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/wild_in_or_pats.rs:clippy_lints::matches::wild_in_or_pats::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,711 ( 0.00%) include/jemalloc/internal/tsd.h:pa_dalloc 26,672 ( 0.00%) ???:::visit_generic_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,670 ( 0.00%) ???:::visit_field_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,658 ( 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] 26,636 ( 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] 26,607 ( 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:::def_key:: 26,582 ( 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 26,557 ( 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/walk.rs: as core::iter::traits::iterator::Iterator>::next [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 26,557 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 26,536 ( 0.00%) ???:::try_print_visible_def_path_recur [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,524 ( 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:::qpath 26,503 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,502 ( 0.00%) ???: as rustc_data_structures::flat_map_in_place::FlatMapInPlace>::flat_map_in_place::::{closure#0}, smallvec::SmallVec<[rustc_ast::ast::Param; 1]>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,489 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/const_ptr.rs:::check_expr 26,466 ( 0.00%) ???:>::lift_to_interner [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,455 ( 0.00%) ???:>>::grow_one [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,426 ( 0.00%) ???:::source_callsite'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,425 ( 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 26,401 ( 0.00%) ???:::recover_after_dot [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,397 ( 0.00%) ???:::parse_pat_no_top_guard_inner'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,394 ( 0.00%) ???:::expect_any_with_type [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,349 ( 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] 26,339 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/validations.rs:::visit_pat'2 26,292 ( 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: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&str, core::str::iter::Split>>::from_iter 26,278 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::visit_arm 26,271 ( 0.00%) ???:::with_lifetime_rib::<(), ::resolve_fn_signature>, ::visit_path_segment::{closure#0}>>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 26,262 ( 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 26,220 ( 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] 26,144 ( 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:: 26,115 ( 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] 26,115 ( 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] 26,091 ( 0.00%) /rust/deps/rustc-hash-2.1.1/src/lib.rs:::check_mac 26,090 ( 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 26,068 ( 0.00%) include/jemalloc/internal/ehooks.h:pa_alloc 26,040 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/combined_early_pass.rs:::check_local [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 25,894 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,894 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,894 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,894 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,894 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,894 ( 0.00%) ???:::visit_use_tree'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,825 ( 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] 25,805 ( 0.00%) ???:rustc_query_impl::query_impl::resolve_instance_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] 25,797 ( 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 rustc_hir::intravisit::Visitor>::visit_expr'2 25,788 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/query/caches.rs:::check_expr 25,763 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_direct_expn_of [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 25,749 ( 0.00%) src/decay.c:arena_decay 25,744 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next 25,744 ( 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::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next 25,744 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::next 25,728 ( 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] 25,696 ( 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] 25,665 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::adt_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,636 ( 0.00%) ???:::flat_map_assoc_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,628 ( 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] 25,610 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/x86/sse2.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: 25,578 ( 0.00%) ???:::flat_map_generic_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,571 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:rustc_hir::intravisit::walk_stmt::>'2 25,563 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:clippy_lints::unit_types::unit_arg::check 25,563 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::filter::Filter, core::slice::iter::Iter>, clippy_lints::unit_types::unit_arg::check::{closure#0}>>>::from_iter 25,560 ( 0.00%) ???:::visit_field_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,552 ( 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 25,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] 25,546 ( 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:: 25,545 ( 0.00%) /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/toml_parser-1.1.2+spec-1.1.0/src/lexer/mod.rs:::next [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 25,539 ( 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 25,520 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_expr::'2 25,500 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:>::walk_mut [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 25,500 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/ifs/branches_sharing_code.rs:clippy_lints::ifs::branches_sharing_code::check_match [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 25,492 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/thread_local/native/mod.rs:::check_expr 25,488 ( 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] 25,480 ( 0.00%) ???: as rustc_ast::visit::Visitor>::visit_use_tree [???] 25,480 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/ifs/same_functions_in_if_cond.rs:clippy_lints::ifs::same_functions_in_if_cond::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 25,420 ( 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 25,366 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_impl_item 25,354 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter.rs:::check_block 25,350 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:::check_expr 25,260 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 25,251 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/cognitive_complexity.rs:rustc_hir::intravisit::walk_block::::check::{closure#0}>> 25,245 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/try_err.rs:clippy_lints::matches::try_err::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 25,242 ( 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 25,226 ( 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 25,222 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_none_pattern [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 25,111 ( 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}> 25,086 ( 0.00%) ???:::select [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,080 ( 0.00%) ???:::stmt_super_let_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 25,011 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_ty::'2 24,973 ( 0.00%) ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::fold::TypeFoldable>::fold_with::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,958 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cell.rs:::expr 24,944 ( 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::is_else_clause 24,934 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs:>::make_code_span 24,906 ( 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:>::make_code_span 24,887 ( 0.00%) include/jemalloc/internal/mutex.h:realloc 24,886 ( 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 24,883 ( 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] 24,851 ( 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 24,844 ( 0.00%) ???:::parse_mod'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,833 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::never_loop_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 24,832 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/cognitive_complexity.rs:rustc_hir::intravisit::walk_local::::check::{closure#0}>> 24,818 ( 0.00%) ???:::resolve_pattern_inner::{closure#0}'2 [???] 24,791 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,776 ( 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 24,731 ( 0.00%) ???:llvm::SubtargetFeatureKV const* Find(llvm::StringRef, llvm::ArrayRef) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 24,700 ( 0.00%) ???:::block_all [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,696 ( 0.00%) src/extent_dss.c:ecache_evict 24,685 ( 0.00%) ???:::intern [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,606 ( 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] 24,594 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/map.rs:::check_generics 24,588 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs:clippy_lints::minmax::min_max 24,576 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,570 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/ifs/ifs_same_cond.rs:clippy_lints::ifs::ifs_same_cond::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 24,543 ( 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 24,543 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_impl_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,540 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_generic_args [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,509 ( 0.00%) ???:::flat_map_variant [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,495 ( 0.00%) /rust/deps/indexmap-2.14.0/src/map.rs:::instantiate_bound_regions::::instantiate_bound_regions_with_erased::{closure#0}>::{closure#0} 24,473 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:clippy_lints::functions::must_use::check_item 24,467 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_local 24,443 ( 0.00%) ???:::scan_begin [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,432 ( 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] 24,411 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/redundant_static_lifetimes.rs:::check_item 24,350 ( 0.00%) ???:llvm::X86_MC::initLLVMToSEHAndCVRegMapping(llvm::MCRegisterInfo*) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 24,344 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/intrinsics/mod.rs:::check_pat 24,314 ( 0.00%) ???:::emit_diagnostic'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,298 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_expr_unadjusted [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 24,293 ( 0.00%) ???:rustc_expand::mbe::macro_rules::check_matcher_core'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,270 ( 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 24,264 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_fn'2 [???] 24,264 ( 0.00%) ???:::anonymize_bound_vars::Anonymize> 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] 24,246 ( 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 24,236 ( 0.00%) ???:::check_generic_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,228 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 24,227 ( 0.00%) ???:::visit_def_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,218 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/needless_question_mark.rs:::check_body 24,203 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/cmp.rs:::check_expr 24,192 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/lock.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: 24,192 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: 24,192 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/control/tag.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: 24,175 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,173 ( 0.00%) ???:>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,138 ( 0.00%) ???:>::insert_entry [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,131 ( 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 24,128 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:::check_impl_item 24,122 ( 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] 24,115 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::if_statement_binops'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 24,113 ( 0.00%) ???:::token_trees [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,110 ( 0.00%) ???:0x0000000000016d80 [/usr/lib/ld-linux-x86-64.so.2] 24,108 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::chain::Chain, core::slice::iter::Iter>>>::from_iter 24,105 ( 0.00%) ???:>::walk_ref'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,100 ( 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:::eq_path_segment 24,093 ( 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 24,093 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,090 ( 0.00%) ???:::expr_call [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,078 ( 0.00%) ???:::visit_qpath [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 24,054 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs: as core::iter::traits::iterator::Iterator>::try_fold::flatten::, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0} 24,046 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:::check_expr 24,025 ( 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 23,892 ( 0.00%) ???:; 1]>>::reserve_one_unchecked [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,891 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:clippy_utils::macros::root_macro_call 23,891 ( 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::macros::root_macro_call 23,864 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::parse [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 23,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/span_encoding.rs:::data [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 23,838 ( 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 23,833 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::new 23,828 ( 0.00%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, core::result::Result<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty>, rustc_middle::ty::util::AlwaysRequiresDrop>>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,811 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/edition.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 23,811 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 23,811 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 23,811 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 23,800 ( 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] 23,798 ( 0.00%) ???:::parse_expr_for [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,797 ( 0.00%) ???:::stable_hash::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,789 ( 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}> 23,760 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_lints::needless_question_mark::check 23,754 ( 0.00%) ???:rustc_hir::intravisit::walk_block::'2 [???] 23,749 ( 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 23,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:::check_body 23,741 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/sty.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::filter::Filter, core::slice::iter::Iter>, clippy_lints::unit_types::unit_arg::check::{closure#0}>>>::from_iter 23,741 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_arg.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::filter::Filter, core::slice::iter::Iter>, clippy_lints::unit_types::unit_arg::check::{closure#0}>>>::from_iter 23,711 ( 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 23,706 ( 0.00%) ???:::parse_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,700 ( 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] 23,699 ( 0.00%) ???:::contains [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,685 ( 0.00%) include/jemalloc/internal/bit_util.h:pa_dalloc 23,655 ( 0.00%) ???:::ident [???] 23,602 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,600 ( 0.00%) include/jemalloc/internal/pai.h:tcache_bin_flush_small 23,600 ( 0.00%) src/pa.c:tcache_bin_flush_small 23,595 ( 0.00%) ???:::flat_map_pat_field [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,582 ( 0.00%) ???:> as rustc_data_structures::flat_map_in_place::FlatMapInPlace>>::flat_map_in_place::::{closure#0}, core::option::Option>>'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,574 ( 0.00%) ???:>::reserve [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,550 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_block [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 23,538 ( 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:::visit_pat 23,506 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::search_same::<&rustc_hir::hir::Expr, clippy_lints::ifs::ifs_same_cond::check::{closure#0}, clippy_lints::ifs::ifs_same_cond::check::{closure#1}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 23,505 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_arm [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 23,489 ( 0.00%) ???:::flat_map_param [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,483 ( 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] 23,477 ( 0.00%) ???:::new::build_recur'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,466 ( 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<&str, core::str::iter::Split>>::from_iter [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 23,460 ( 0.00%) ???:::boxed_ty [???] 23,438 ( 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 23,420 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:::check_attributes 23,346 ( 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 23,334 ( 0.00%) /rust/deps/smallvec-1.15.1/src/lib.rs: as core::iter::traits::collect::Extend>::extend::>>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 23,302 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::get 23,284 ( 0.00%) include/jemalloc/internal/ticker.h:tcache_bin_flush_small 23,266 ( 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] 23,258 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/memchr.rs:clippy_lints::doc::broken_link::check 23,205 ( 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:: 23,203 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,203 ( 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] 23,152 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_impl_item 23,148 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/mod.rs:::check_item 23,142 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,112 ( 0.00%) ???:::emit_diagnostic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,081 ( 0.00%) ???:::is_coroutine [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 23,059 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 23,059 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mut_ptr.rs:clippy_lints::loops::never_loop::never_loop_expr'2 23,048 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 23,047 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:clippy_utils::check_proc_macro::span_matches_pat 23,008 ( 0.00%) ???:rustc_hir::intravisit::walk_fn:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,954 ( 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:: 22,952 ( 0.00%) ???:::as_sym [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,940 ( 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::> 22,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:::get_all_attrs:: 22,937 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:::check_block 22,932 ( 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] 22,921 ( 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] 22,902 ( 0.00%) ???:::candidate_from_obligation'2 [???] 22,880 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check_stmt 22,868 ( 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 22,827 ( 0.00%) ???:::hir_body_param_idents [???] 22,815 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::check_binops [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 22,781 ( 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] 22,752 ( 0.00%) ???:>::insert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,740 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::search_same::<&rustc_hir::hir::Expr, clippy_lints::ifs::same_functions_in_if_cond::check::{closure#1}, &dyn for<'a, 'b, 'c, 'd, 'e, 'f> core::ops::function::Fn<(&'a &'b rustc_hir::hir::Expr<'c>, &'d &'e rustc_hir::hir::Expr<'f>), Output = bool>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 22,708 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:rustc_hir::intravisit::walk_ty::> 22,629 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/control/tag.rs:::check_pat 22,619 ( 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 22,600 ( 0.00%) ???:::intern_region [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,574 ( 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 22,568 ( 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 22,545 ( 0.00%) ???:llvm::DenseMapBase, llvm::detail::DenseMapPair >, void const*, llvm::PassInfo const*, llvm::DenseMapInfo, llvm::detail::DenseMapPair >::moveFrom(llvm::DenseMap, llvm::detail::DenseMapPair >&) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 22,544 ( 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::> 22,542 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs: as alloc::vec::spec_from_iter::SpecFromIter, ::check_item_kind::{closure#0}>, ::check_item_kind::{closure#1}>, core::option::Option>>>::from_iter 22,534 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,528 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,518 ( 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] 22,515 ( 0.00%) ???:::get_extern_module_with_lock'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,514 ( 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::'2 22,508 ( 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] 22,505 ( 0.00%) ???:::parse_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,452 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::visit_block 22,444 ( 0.00%) ???:::parse_literal_maybe_minus [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,411 ( 0.00%) ???:>::reserve_rehash::::{closure#0}> [???] 22,409 ( 0.00%) ???:rustc_expand::mbe::macro_rules::check_matcher_core [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,380 ( 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 22,367 ( 0.00%) ???: as rustc_hir::intravisit::Visitor>::visit_expr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,326 ( 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 22,320 ( 0.00%) ???:::visit_path_segment [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,288 ( 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::> 22,278 ( 0.00%) ???:::replaces_meaningful_content [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,223 ( 0.00%) ???:rustc_parse::parser::token_descr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,205 ( 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] 22,167 ( 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 22,144 ( 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] 22,132 ( 0.00%) ???:>::super_fold_with:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,113 ( 0.00%) ???:::parse_expr_struct [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,101 ( 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 22,066 ( 0.00%) ???:rustc_passes::lang_items::get_lang_items'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,060 ( 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] 22,029 ( 0.00%) ???:::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 22,006 ( 0.00%) ???:::compute_and_check_or_pat_binding_map [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,999 ( 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:>::swap_remove:: 21,967 ( 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 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 21,964 ( 0.00%) ???:::flat_map_assoc_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,962 ( 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::ty::get_field_def_id_by_name 21,958 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::methods::clone_on_copy::check_function 21,949 ( 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 21,939 ( 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::qpath_search_pat 21,939 ( 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] 21,901 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/bool.rs:::def_key:: 21,901 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:::def_key:: 21,883 ( 0.00%) include/jemalloc/internal/ph.h:realloc 21,868 ( 0.00%) ???:rustc_expand::placeholders::placeholder::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,866 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,862 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/too_many_arguments.rs:::check_fn 21,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:::check_item 21,845 ( 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_path 21,803 ( 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] 21,798 ( 0.00%) src/eset.c:pa_dalloc 21,794 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:>::walk_mut [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 21,778 ( 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 21,735 ( 0.00%) ???:core::slice::sort::stable::quicksort::quicksort::::sort_by_key<&core::option::Option, , rustc_middle::ty::assoc::AssocItem> as core::iter::traits::collect::FromIterator<(core::option::Option, rustc_middle::ty::assoc::AssocItem)>>::from_iter, rustc_ty_utils::assoc::associated_items::{closure#0}>, ::new, rustc_ty_utils::assoc::associated_items::{closure#0}>>::{closure#0}>>::{closure#0}>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,713 ( 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 21,682 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,675 ( 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] 21,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] 21,651 ( 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:>::swap_remove:: 21,629 ( 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 21,612 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:::check_expr 21,610 ( 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 21,608 ( 0.00%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,588 ( 0.00%) ???:core::ptr::drop_glue::>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,577 ( 0.00%) ???:::allows_unstable [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,536 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context/tls.rs:::check_expr 21,530 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:clippy_utils::test_item_names 21,518 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../portable-simd/crates/core_simd/src/simd/cmp/eq.rs:<&str as core::str::pattern::Pattern>::is_contained_in 21,503 ( 0.00%) ???:::descent_to_ambiguity [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,468 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/hash/mod.rs:::get_def_id_availability 21,460 ( 0.00%) ???:::parse_tuple_struct_body [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,454 ( 0.00%) ???:::define_macro [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,429 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,420 ( 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] 21,397 ( 0.00%) ???:::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,388 ( 0.00%) include/jemalloc/internal/jemalloc_internal_inlines_b.h:tcache_bin_flush_small 21,358 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:, rustc_type_ir::sty::Region>>::insert_unique 21,346 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,344 ( 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] 21,327 ( 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::> 21,320 ( 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:: 21,318 ( 0.00%) ???:::cook_quoted [???] 21,301 ( 0.00%) ???:rustc_ty_utils::instance::resolve_instance_raw [???] 21,274 ( 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:<&mut clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0} as core::ops::function::FnMut<(&rustc_hir::hir::Attribute,)>>::call_mut 21,274 ( 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:<&mut clippy_lints::doc::suspicious_doc_comments::collect_doc_replacements::{closure#0} as core::ops::function::FnMut<(&rustc_hir::hir::Attribute,)>>::call_mut 21,254 ( 0.00%) ???:::check_fn_for_external_abi_fnptr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,224 ( 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 21,200 ( 0.00%) ???:::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,193 ( 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 21,166 ( 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 21,160 ( 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 21,129 ( 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:: [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 21,122 ( 0.00%) ???:core::ptr::drop_glue:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,118 ( 0.00%) ???:thin_vec::drop_non_singleton:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,114 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,112 ( 0.00%) include/jemalloc/internal/atomic.h:extent_try_coalesce_impl.llvm.9305427869391012685 21,108 ( 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::unwrap::extract_local 21,108 ( 0.00%) ???:::explicit_super_clauses_of [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,101 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:, rustc_middle::dep_graph::graph::DepNodeIndex))>>>::get:: 21,098 ( 0.00%) ???:::parse_array_or_slice_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,085 ( 0.00%) ???:rustc_ast::visit::walk_fn::>'2 [???] 21,069 ( 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] 21,060 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:rustc_hir::intravisit::walk_stmt::> 21,053 ( 0.00%) ???:::maybe_scalar [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 21,052 ( 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 21,042 ( 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] 21,010 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/x86/sse2.rs:::check_body 20,955 ( 0.00%) ???:rustc_query_impl::query_impl::inhabited_predicate_type::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] 20,952 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/attr/mod.rs:::check_item 20,945 ( 0.00%) ???:::is_trivially_freeze [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,943 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/cognitive_complexity.rs:rustc_hir::intravisit::walk_stmt::::check::{closure#0}>> 20,912 ( 0.00%) ???:::mk_adt_def [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,900 ( 0.00%) ???:llvm::DenseMapBase, llvm::detail::DenseSetPair >, llvm::CachedHashStringRef, llvm::detail::DenseSetEmpty, llvm::DenseMapInfo, llvm::detail::DenseSetPair >::moveFrom(llvm::DenseMap, llvm::detail::DenseSetPair >&) [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/libLLVM.so.23.1-rust-1.99.0-nightly] 20,894 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:clippy_utils::if_sequence 20,871 ( 0.00%) include/jemalloc/internal/sz.h:large_ralloc 20,867 ( 0.00%) ???:rustc_ast::mut_visit::walk_flat_map_assoc_item:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,866 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,838 ( 0.00%) ???:rustc_builtin_macros::util::expr_to_spanned_string [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,814 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_item 20,812 ( 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:>::remove_entry::::{closure#0}> 20,794 ( 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] 20,794 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::is_format_macro [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 20,780 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs: as core::cmp::PartialEq>::eq 20,780 ( 0.00%) ???:::opt_rpitit_info [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,758 ( 0.00%) ???:::record_partial_res [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,742 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::as_str 20,665 ( 0.00%) ???:::name [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,663 ( 0.00%) ???:::visit_impl_item'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,618 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:rustc_hir::intravisit::walk_expr::>'2 20,606 ( 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] 20,604 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,583 ( 0.00%) ???:::collect_fn_info [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,580 ( 0.00%) src/sz.c:ecache_evict 20,573 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/vec_cache.rs:::impl_trait_ref:: 20,561 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_id/src/lib.rs:::check_expr 20,559 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/hir/map.rs:::check_expr 20,551 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_result_large_err [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 20,548 ( 0.00%) ???:::visit_use_tree [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,535 ( 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] 20,520 ( 0.00%) ???:rustc_hir::intravisit::walk_body:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,511 ( 0.00%) ???:::build_reduced_graph_for_block [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,510 ( 0.00%) ???:::with_rib::<(), ::with_constant_rib<::resolve_anon_const_manual<::resolve_anon_const::{closure#0}>::{closure#0}>::{closure#0}::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,469 ( 0.00%) /rustc/84b36a78a28a63f134171c670be1932ffa2485f8/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/80122c672fbe49ef/out/build/src/extent.c:ecache_alloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 20,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:::emit_lint_if_under_msrv 20,442 ( 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] 20,407 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_pat 20,405 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::expr_sig [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 20,403 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/visitors.rs:::check_fn 20,387 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/doc/too_long_first_doc_paragraph.rs:::check_attributes 20,376 ( 0.00%) ???:write [/usr/lib/libc.so.6] 20,374 ( 0.00%) include/jemalloc/internal/cache_bin.h:calloc 20,355 ( 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 20,354 ( 0.00%) ???:::expand::{closure#1} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,352 ( 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 20,350 ( 0.00%) ???:::convert_normal_to_synthetic [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,340 ( 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 20,339 ( 0.00%) ???:>::reserve [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,332 ( 0.00%) ???:0x000000000009d5b0 [/usr/lib/libc.so.6] 20,297 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/accum.rs:clippy_lints::utils::author::check_item 20,297 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/uint_macros.rs:clippy_lints::utils::author::check_item 20,296 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,295 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:rustc_hir::intravisit::walk_path_segment:: 20,284 ( 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] 20,257 ( 0.00%) ???:>::try_fold_ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,231 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/control/bitmask.rs:::check_pat 20,226 ( 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 20,218 ( 0.00%) ???:::process_cfg_attr [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,211 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:rustc_hir::intravisit::walk_fn::> 20,202 ( 0.00%) ???:::is_trivially_pure_clone_copy [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,196 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/def.rs:::hir 20,193 ( 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_hir::hir::Expr, core::iter::adapters::filter::Filter, core::slice::iter::Iter>, clippy_lints::unit_types::unit_arg::check::{closure#0}>>>::from_iter 20,190 ( 0.00%) /rust/deps/thin-vec-0.2.19/src/lib.rs:>::walk_ref 20,178 ( 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] 20,167 ( 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] 20,102 ( 0.00%) ???:::clone [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,088 ( 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 20,077 ( 0.00%) ???:::check_arm [???] 20,057 ( 0.00%) ???:>::walk_ref [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,050 ( 0.00%) ???:::new_with_limit [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,039 ( 0.00%) ???:rustc_attr_parsing::attributes::cfg::eval_config_entry'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,031 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/unsafe_removed_from_name.rs:clippy_lints::unsafe_removed_from_name::check_use_tree'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 20,022 ( 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:: 20,020 ( 0.00%) ???:::resolve_trait_item::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 20,002 ( 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 19,997 ( 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:>::get:: 19,979 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_expr'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,920 ( 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 19,919 ( 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 19,875 ( 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] 19,861 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,852 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::over::::eq_exprs::{closure#0}> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,844 ( 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] 19,841 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_local 19,832 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:clippy_utils::check_proc_macro::expr_search_pat::expr_search_pat_inner 19,811 ( 0.00%) ???:rustc_hir::intravisit::walk_ty:: [???] 19,800 ( 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 19,800 ( 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] 19,794 ( 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 19,778 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs: as alloc::vec::spec_from_iter_nested::SpecFromIterNested<&rustc_hir::hir::Expr, core::iter::adapters::chain::Chain, core::slice::iter::Iter>>>::from_iter 19,760 ( 0.00%) ???:rustc_builtin_macros::assert::expand_assert [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,754 ( 0.00%) ???:)>>::reserve_rehash::, rustc_hash::FxBuildHasher>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,686 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_block'2 [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,675 ( 0.00%) ???:<[(rustc_middle::ty::predicate::Clause, rustc_span::span_encoding::Span)] as rustc_data_structures::stable_hash::StableHash>::stable_hash:: [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,656 ( 0.00%) ???:close [/usr/lib/libc.so.6] 19,645 ( 0.00%) ???:::call [???] 19,635 ( 0.00%) ???:core::ptr::drop_glue::> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,623 ( 0.00%) ???:::instantiate_opt'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,613 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 19,609 ( 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:>::push_suggestion 19,600 ( 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] 19,592 ( 0.00%) ???:::with_ctxt_from_mark [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,586 ( 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 19,564 ( 0.00%) ???: 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] 19,543 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::visit_expr'2 19,524 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/collections/btree/map/entry.rs:>::insert_entry [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,524 ( 0.00%) ???:::check_unused_parens_pat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,500 ( 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] 19,493 ( 0.00%) ???:::mk_poly_existential_predicates [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,475 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:>::walk_ref [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,447 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check_deprecated_cfg_recursively [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,445 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/ifs/if_same_then_else.rs:clippy_lints::ifs::if_same_then_else::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,436 ( 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_start_matches::<::is_whitespace> 19,436 ( 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_start_matches::<::is_whitespace> 19,435 ( 0.00%) ???:::lower_expr_mut::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,424 ( 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:: 19,409 ( 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 19,388 ( 0.00%) ???:>::rebase_onto [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,376 ( 0.00%) ???:::parse_local'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,360 ( 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 19,350 ( 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 19,350 ( 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] 19,330 ( 0.00%) ???:std::sys::fs::unix::try_statx [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,320 ( 0.00%) ???:::has_name [???] 19,320 ( 0.00%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, rustc_middle::mir::query::ConstQualifs>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,300 ( 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] 19,298 ( 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] 19,296 ( 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] 19,280 ( 0.00%) ???:rustc_hir::intravisit::walk_block:: [???] 19,270 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::next 19,263 ( 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::> 19,253 ( 0.00%) ???:>::super_fold_with::'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,240 ( 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:::search_pat 19,235 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,226 ( 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::::expr_usage_requires_vec::{closure#0}, ()>> 19,191 ( 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::check_doc::> 19,188 ( 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 19,165 ( 0.00%) ???:>::decode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,147 ( 0.00%) ???:::print_def_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,137 ( 0.00%) ???:::check_use_tree'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,121 ( 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 19,121 ( 0.00%) ???:rustc_expand::mbe::macro_rules::check_lhs_no_empty_seq'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,116 ( 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::::check::{closure#0}>> [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,110 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/doc/broken_link.rs:clippy_lints::doc::broken_link::check [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 19,063 ( 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] 19,047 ( 0.00%) include/jemalloc/internal/sz.h:free_default 19,045 ( 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] 19,036 ( 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 19,036 ( 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 19,036 ( 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 19,036 ( 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 19,036 ( 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 19,036 ( 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 19,030 ( 0.00%) ???:core::ptr::drop_glue::)>> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 19,000 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs:::check_stmt 18,984 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,975 ( 0.00%) ???:rustc_query_impl::query_impl::visibility::execute_query_incr::__rust_end_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,974 ( 0.00%) ???:::decode_expn_id [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,953 ( 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 18,948 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/bool.rs:::opt_item_name:: 18,948 ( 0.00%) ???:)>>::call_once [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,942 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/collapsible_if.rs:::check_collapsible_if_if [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 18,937 ( 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::'2 18,893 ( 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] 18,881 ( 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 18,880 ( 0.00%) ???:::new::build_recur [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,868 ( 0.00%) ???:::ty_path [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,858 ( 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::do_reserve_and_handle:: 18,850 ( 0.00%) ???:::parse_block'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,844 ( 0.00%) ???:::fill_well_known [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,817 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/chain.rs:clippy_lints::loops::never_loop::never_loop_expr'2 18,808 ( 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::> 18,782 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/raw.rs:clippy_lints::attrs::mixed_attributes_style::check 18,776 ( 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] 18,772 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/query/inner.rs:::check_expr 18,732 ( 0.00%) ???:::try_print_visible_def_path_recur'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,731 ( 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::functions::duplicate_underscore_argument::check 18,715 ( 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}>> 18,704 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::get::{closure#0}> as rustc_hir::intravisit::Visitor>::visit_expr'2 18,689 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/accum.rs:::check_impl_item 18,689 ( 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_impl_item 18,683 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::visit_block'2 18,681 ( 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_lints::doc::doc_suspicious_footnotes::check 18,630 ( 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] 18,624 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:::check_expr 18,620 ( 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] 18,617 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/matches/collapsible_match.rs:clippy_lints::matches::collapsible_match::check_arm [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 18,612 ( 0.00%) ???:rustc_expand::mbe::quoted::parse [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,608 ( 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::is_descendant_of::{closure#0}>::{closure#0}, bool> 18,593 ( 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_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::fold::TypeFoldable>::fold_with::> 18,592 ( 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 18,552 ( 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] 18,514 ( 0.00%) ???:::doc_str [???] 18,501 ( 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_qpath:: 18,497 ( 0.00%) ???:::parse_expr_assoc_rest_with [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,484 ( 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 18,484 ( 0.00%) ???:::parse_const_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,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:>::walk_ref 18,467 ( 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] 18,463 ( 0.00%) ???:::get_module [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,463 ( 0.00%) ???:rustc_query_impl::execution::try_execute_query::, rustc_middle::dep_graph::graph::DepNodeIndex>, true> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,459 ( 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] 18,449 ( 0.00%) ???:rustc_middle::ty::util::reveal_opaque_types_in_bounds [???] 18,420 ( 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] 18,399 ( 0.00%) ???:::ty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,394 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::entry::::{closure#0}, indexmap::inner::get_hash::{closure#0}> 18,392 ( 0.00%) ???:>, ::create_struct_patterns::{closure#0}::{closure#0}>, ::create_struct_patterns::{closure#0}::{closure#1}> 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] 18,372 ( 0.00%) ???:>>::new [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,366 ( 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 18,339 ( 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/large.c:large_ralloc [/home/moon/git/rustc-perf/site/frontend/rust-clippy/target/clippy-build/clippy-driver] 18,336 ( 0.00%) ???:::fresh_empty [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,334 ( 0.00%) include/jemalloc/internal/san.h:malloc_default 18,328 ( 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] 18,327 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/sync/atomic.rs:>::with::<::with::outer_expn_data::{closure#0}>::{closure#0}, rustc_span::hygiene::ExpnData> 18,325 ( 0.00%) ???:::parse_for_head [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,317 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs:::check_mac_def::check_ts'2 18,308 ( 0.00%) ???: as rustc_serialize::serialize::Encodable>::encode [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,278 ( 0.00%) ???:::check_impl_item [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,228 ( 0.00%) ???:rustc_query_impl::plumbing::encode_query_values_inner::>, &rustc_middle::mir::Body>::{closure#0} [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,216 ( 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:>::handle_inline_pass1 18,211 ( 0.00%) ???:>::process_mod'2 [???] 18,203 ( 0.00%) ???:rustc_query_impl::query_impl::type_of::invoke_provider_fn::__rust_begin_short_backtrace [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,192 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs:::check_expr 18,180 ( 0.00%) include/jemalloc/internal/bit_util.h:ecache_evict 18,180 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/consts.rs:::hash_expr'2 18,162 ( 0.00%) ???:core::slice::sort::unstable::quicksort::quicksort::::sort_unstable_by<::new::{closure#2}>::{closure#0}> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,148 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/iterator.rs: as core::iter::traits::iterator::Iterator>::try_fold::flatten::, clippy_utils::macros::macro_backtrace::{closure#0}>, clippy_utils::macros::first_node_macro_backtrace::{closure#0}::{closure#0}>, (), core::ops::control_flow::ControlFlow, core::iter::traits::iterator::Iterator::find::check::{closure#0}>::{closure#0} 18,132 ( 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:, rustc_type_ir::sty::Region>>::insert_unique 18,132 ( 0.00%) ???:::ty [???] 18,123 ( 0.00%) include/jemalloc/internal/edata.h:edata_cache_put 18,118 ( 0.00%) ???:rustc_interface::passes::analysis [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,116 ( 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:>::entry::::{closure#0}, indexmap::inner::get_hash::{closure#0}> 18,114 ( 0.00%) ???:0x000000000000aa70 [/usr/lib/ld-linux-x86-64.so.2] 18,100 ( 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] 18,085 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:::eq_qpath 18,071 ( 0.00%) site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:rustc_hir::intravisit::walk_ty::> 18,056 ( 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 18,056 ( 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 18,056 ( 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 18,056 ( 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 18,048 ( 0.00%) ???:::fmt [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 18,040 ( 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] 18,030 ( 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 18,018 ( 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 18,000 ( 0.00%) ???:pthread_rwlock_unlock [/usr/lib/libc.so.6] 17,997 ( 0.00%) ???:>::with::<::as_str::{closure#0}, &str> [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,991 ( 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 17,961 ( 0.00%) ???:rustc_attr_parsing::attributes::cfg::parse_cfg_entry'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,950 ( 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 17,950 ( 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 17,950 ( 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 17,948 ( 0.00%) site/frontend/rust-clippy/clippy_utils/src/macros.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 17,946 ( 0.00%) ???:>>::drop_slow [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,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::no_effect::reduce_expression 17,929 ( 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 17,927 ( 0.00%) /rust/deps/hashbrown-0.17.1/src/control/bitmask.rs:>::insert 17,922 ( 0.00%) ???:>::insert_full [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,909 ( 0.00%) ???:::parse_expr_array_or_repeat [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,904 ( 0.00%) ???:rustc_metadata::rmeta::decoder::cstore_impl::provide_extern::associated_types_for_impl_traits_in_trait_or_impl'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,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:clippy_utils::str_utils::to_camel_case 17,892 ( 0.00%) /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/fmt/mod.rs:clippy_lints::functions::duplicate_underscore_argument::check 17,858 ( 0.00%) ???:::data [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,856 ( 0.00%) /rust/deps/pulldown-cmark-0.11.3/src/lib.rs:clippy_lints::doc::check_doc::> 17,844 ( 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::functions::duplicate_underscore_argument::check 17,838 ( 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:>::remove_entry::::{closure#0}> 17,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:::check_item 17,821 ( 0.00%) ???:::resolve_const_item_rhs [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] 17,815 ( 0.00%) /rust/deps/hashbrown-0.17.0/src/raw.rs:>::get_mut:: 17,814 ( 0.00%) ???:>::walk_mut'2 [/home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/librustc_driver-173404cd07acc0f2.so] -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/sty.rs -------------------------------------------------------------------------------- Ir -- line 426 ---------------------------------------- . .fresh_float_tys . .get(n as usize) . .copied() . .unwrap_or_else(|| Ty::new_infer(tcx, ty::FreshFloatTy(n))) . } . . #[inline] . pub fn new_param(tcx: TyCtxt<'tcx>, index: u32, name: Symbol) -> Ty<'tcx> { 126 ( 0.00%) Ty::new(tcx, Param(ParamTy { index, name })) . } . . #[inline] . pub fn new_bound( . tcx: TyCtxt<'tcx>, . index: ty::DebruijnIndex, . bound_ty: ty::BoundTy<'tcx>, . ) -> Ty<'tcx> { -- line 442 ---------------------------------------- -- line 489 ---------------------------------------- . ty::AliasTyKind::Opaque { def_id } => { . debug_assert_matches!(tcx.def_kind(def_id), DefKind::OpaqueTy) . } . ty::AliasTyKind::Free { def_id } => { . debug_assert_matches!(tcx.def_kind(def_id), DefKind::TyAlias) . } . } . } 3,789 ( 0.00%) Ty::new(tcx, Alias(is_rigid, alias_ty)) . } . . #[inline] . pub fn new_pat(tcx: TyCtxt<'tcx>, base: Ty<'tcx>, pat: ty::Pattern<'tcx>) -> Ty<'tcx> { . Ty::new(tcx, Pat(base, pat)) . } . . #[inline] -- line 505 ---------------------------------------- -- line 604 ---------------------------------------- . . #[inline] . pub fn new_ref( . tcx: TyCtxt<'tcx>, . r: Region<'tcx>, . ty: Ty<'tcx>, . mutbl: ty::Mutability, . ) -> Ty<'tcx> { 42 ( 0.00%) Ty::new(tcx, Ref(r, ty, mutbl)) . } . . #[inline] . pub fn new_mut_ref(tcx: TyCtxt<'tcx>, r: Region<'tcx>, ty: Ty<'tcx>) -> Ty<'tcx> { . Ty::new_ref(tcx, r, ty, hir::Mutability::Mut) . } . . #[inline] -- line 620 ---------------------------------------- -- line 679 ---------------------------------------- . | DefKind::GlobalAsm . | DefKind::Impl { .. } . | DefKind::Closure . | DefKind::SyntheticCoroutineBody => { . bug!("not an adt: {def:?} ({:?})", tcx.def_kind(def.did())) . } . } . } 8 ( 0.00%) Ty::new(tcx, Adt(def, args)) . } . . #[inline] . pub fn new_foreign(tcx: TyCtxt<'tcx>, def_id: DefId) -> Ty<'tcx> { . Ty::new(tcx, Foreign(def_id)) . } . . #[inline] -- line 695 ---------------------------------------- -- line 703 ---------------------------------------- . ty: Ty<'tcx>, . ct: ty::Const<'tcx>, . ) -> Ty<'tcx> { . Ty::new(tcx, Array(ty, ct)) . } . . #[inline] . pub fn new_slice(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Ty<'tcx> { 45 ( 0.00%) Ty::new(tcx, Slice(ty)) . } . . #[inline] . pub fn new_tup(tcx: TyCtxt<'tcx>, ts: &[Ty<'tcx>]) -> Ty<'tcx> { . if ts.is_empty() { tcx.types.unit } else { Ty::new(tcx, Tuple(tcx.mk_type_list(ts))) } . } . . pub fn new_tup_from_iter(tcx: TyCtxt<'tcx>, iter: I) -> T::Output -- line 719 ---------------------------------------- -- line 1152 ---------------------------------------- . // noticeable performance hit. See #126069 for details. . #[inline(always)] . pub fn kind(self) -> &'tcx TyKind<'tcx> { . self.0.0 . } . . #[inline] . pub fn is_unit(self) -> bool { 28,164 ( 0.00%) match self.kind() { 261 ( 0.00%) Tuple(tys) => tys.is_empty(), . _ => false, . } . } . . /// Check if type is an `usize`. . #[inline] . pub fn is_usize(self) -> bool { . matches!(self.kind(), Uint(UintTy::Usize)) -- line 1169 ---------------------------------------- -- line 1172 ---------------------------------------- . /// Check if type is an `usize` or an integral type variable. . #[inline] . pub fn is_usize_like(self) -> bool { . matches!(self.kind(), Uint(UintTy::Usize) | Infer(IntVar(_))) . } . . #[inline] . pub fn is_never(self) -> bool { 13,900 ( 0.00%) matches!(self.kind(), Never) . } . . #[inline] . pub fn is_primitive(self) -> bool { 701 ( 0.00%) matches!(self.kind(), Bool | Char | Int(_) | Uint(_) | Float(_)) . } . . #[inline] . pub fn is_adt(self) -> bool { . matches!(self.kind(), Adt(..)) . } . . #[inline] . pub fn is_ref(self) -> bool { 1,112 ( 0.00%) matches!(self.kind(), Ref(..)) . } . . #[inline] . pub fn is_ty_var(self) -> bool { . matches!(self.kind(), Infer(TyVar(_))) . } . . #[inline] -- line 1203 ---------------------------------------- -- line 1218 ---------------------------------------- . . #[inline] . pub fn is_ty_or_numeric_infer(self) -> bool { . matches!(self.kind(), Infer(_)) . } . . #[inline] . pub fn is_phantom_data(self) -> bool { 7,920 ( 0.00%) if let Adt(def, _) = self.kind() { def.is_phantom_data() } else { false } . } . . #[inline] . pub fn is_unsafe_cell(self) -> bool { . if let Adt(def, _) = self.kind() { def.is_unsafe_cell() } else { false } . } . . #[inline] . pub fn is_bool(self) -> bool { 6,189 ( 0.00%) *self.kind() == Bool 90 ( 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 (18x) . } . . /// Returns `true` if this type is a `str`. . #[inline] . pub fn is_str(self) -> bool { 170 ( 0.00%) *self.kind() == Str 215 ( 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 (43x) . } . . /// Returns true if this type is `&str`. The reference's lifetime is ignored. . #[inline] . pub fn is_imm_ref_str(self) -> bool { . matches!(self.kind(), ty::Ref(_, inner, hir::Mutability::Not) if inner.is_str()) . } . . #[inline] . pub fn is_param(self, index: u32) -> bool { 28 ( 0.00%) match self.kind() { 7 ( 0.00%) ty::Param(data) => data.index == index, . _ => false, . } . } . . #[inline] . pub fn is_slice(self) -> bool { 89 ( 0.00%) matches!(self.kind(), Slice(_)) . } . . #[inline] . pub fn is_array_slice(self) -> bool { . match self.kind() { . Slice(_) => true, . ty::RawPtr(ty, _) | Ref(_, ty, _) => matches!(ty.kind(), Slice(_)), . _ => false, -- line 1269 ---------------------------------------- -- line 1345 ---------------------------------------- . .try_to_target_usize(tcx) . .expect("expected SIMD field to have definite array size"), . *f0_elem_ty, . ) . } . . #[inline] . pub fn is_mutable_ptr(self) -> bool { 53 ( 0.00%) matches!(self.kind(), RawPtr(_, hir::Mutability::Mut) | Ref(_, _, hir::Mutability::Mut)) . } . . /// Get the mutability of the reference or `None` when not a reference . #[inline] . pub fn ref_mutability(self) -> Option { 6 ( 0.00%) match self.kind() { . Ref(_, _, mutability) => Some(*mutability), . _ => None, . } . } . . #[inline] . pub fn is_raw_ptr(self) -> bool { 817 ( 0.00%) matches!(self.kind(), RawPtr(_, _)) . } . . /// Tests if this is any kind of primitive pointer type (reference, raw pointer, fn pointer). . /// `Box` is *not* considered a pointer here! . #[inline] . pub fn is_any_ptr(self) -> bool { . self.is_ref() || self.is_raw_ptr() || self.is_fn_ptr() . } -- line 1375 ---------------------------------------- -- line 1461 ---------------------------------------- . | RawPtr(_, _) . | Infer(IntVar(_) | FloatVar(_)) . ) . } . . /// Returns `true` if this type is a floating point type. . #[inline] . pub fn is_floating_point(self) -> bool { 461 ( 0.00%) matches!(self.kind(), Float(_) | Infer(FloatVar(_))) . } . . #[inline] . pub fn is_trait(self) -> bool { 3 ( 0.00%) matches!(self.kind(), Dynamic(_, _)) . } . . #[inline] . pub fn is_enum(self) -> bool { 137 ( 0.00%) matches!(self.kind(), Adt(adt_def, _) if adt_def.is_enum()) . } . . #[inline] . pub fn is_union(self) -> bool { . matches!(self.kind(), Adt(adt_def, _) if adt_def.is_union()) . } . . #[inline] -- line 1487 ---------------------------------------- -- line 1496 ---------------------------------------- . . #[inline] . pub fn is_coroutine_closure(self) -> bool { . matches!(self.kind(), CoroutineClosure(..)) . } . . #[inline] . pub fn is_integral(self) -> bool { 2,733 ( 0.00%) matches!(self.kind(), Infer(IntVar(_)) | Int(_) | Uint(_)) . } . . #[inline] . pub fn is_fresh_ty(self) -> bool { . matches!(self.kind(), Infer(FreshTy(_))) . } . . #[inline] -- line 1512 ---------------------------------------- -- line 1521 ---------------------------------------- . . #[inline] . pub fn is_numeric(self) -> bool { . self.is_integral() || self.is_floating_point() . } . . #[inline] . pub fn is_signed(self) -> bool { 198 ( 0.00%) matches!(self.kind(), Int(_)) . } . . #[inline] . pub fn is_ptr_sized_integral(self) -> bool { 8 ( 0.00%) matches!(self.kind(), Int(ty::IntTy::Isize) | Uint(ty::UintTy::Usize)) . } . . #[inline] . pub fn has_concrete_skeleton(self) -> bool { . !matches!(self.kind(), Param(_) | Infer(_) | Error(_)) . } . . /// Checks whether a type recursively contains another type -- line 1542 ---------------------------------------- -- line 1630 ---------------------------------------- . . #[tracing::instrument(level = "trace", skip(tcx))] . pub fn unnormalized_fn_sig(self, tcx: TyCtxt<'tcx>) -> ty::Unnormalized<'tcx, PolyFnSig<'tcx>> { . self.kind().unnormalized_fn_sig(tcx) . } . . #[inline] . pub fn is_fn(self) -> bool { 14,617 ( 0.00%) matches!(self.kind(), FnDef(..) | FnPtr(..)) . } . . #[inline] . pub fn is_fn_ptr(self) -> bool { . matches!(self.kind(), FnPtr(..)) . } . . #[inline] . pub fn is_opaque(self) -> bool { 394 ( 0.00%) matches!(self.kind(), Alias(_, ty::AliasTy { kind: ty::Opaque { .. }, .. })) . } . . #[inline] . pub fn ty_adt_def(self) -> Option> { 49,831 ( 0.00%) match self.kind() { 20,772 ( 0.00%) Adt(adt, _) => Some(*adt), . _ => None, . } . } . . /// Returns a list of tuple type arguments. . /// . /// Panics when called on anything but a tuple. . #[inline] . pub fn tuple_fields(self) -> &'tcx List> { 44 ( 0.00%) match self.kind() { 22 ( 0.00%) Tuple(args) => args, . _ => bug!("tuple_fields called on non-tuple: {self:?}"), . } . } . . /// Returns a list of tuple type arguments, or `None` if `self` isn't a tuple. . #[inline] . pub fn opt_tuple_fields(self) -> Option<&'tcx List>> { . match self.kind() { -- line 1673 ---------------------------------------- 940 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 18,004 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 7,048 ( 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 11,645 ( 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, . ); . } . } . } 20,576 ( 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 124,292 ( 0.00%) if let ExprKind::Binary(bin_op, left_expr, right_expr) = expr.kind 3,380 ( 0.00%) && let BinOpKind::Mul = &bin_op.node 238 ( 0.00%) && !expr.span.from_expansion() 119 ( 0.00%) && let ctxt = expr.span.ctxt() 238 ( 0.00%) && left_expr.span.ctxt() == ctxt 238 ( 0.00%) && right_expr.span.ctxt() == ctxt . && let Some((real_ty_span, resolved_ty, other_expr)) = get_one_size_of_ty(cx, left_expr, right_expr) 55 ( 0.00%) && matches!(resolved_ty.kind(), ty::Int(_) | ty::Uint(_)) 2 ( 0.00%) && let ExprKind::Lit(lit) = &other_expr.kind 7 ( 0.00%) && let LitKind::Int(Pu128(8), _) = lit.node . && self.msrv.meets(cx, msrvs::INTEGER_BITS) . { . let mut app = Applicability::MachineApplicable; . let ty_snip = snippet_with_context(cx, real_ty_span, ctxt, "..", &mut app).0; . let sugg = create_sugg(cx, expr, format!("{ty_snip}::BITS")); . . span_lint_and_sugg( . cx, -- line 68 ---------------------------------------- -- line 69 ---------------------------------------- . MANUAL_BITS, . expr.span, . "usage of `size_of::()` to obtain the size of `T` in bits", . "consider using", . sugg, . app, . ); . } 497,168 ( 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>)> { 1,666 ( 0.00%) match (get_size_of_ty(cx, expr1), get_size_of_ty(cx, expr2)) { 6,104 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_bits.rs:clippy_lints::manual_bits::get_size_of_ty (238x) . (Some((real_ty_span, resolved_ty)), None) => Some((real_ty_span, resolved_ty, expr2)), . (None, Some((real_ty_span, resolved_ty))) => Some((real_ty_span, resolved_ty, expr1)), . _ => None, . } . } . 1,190 ( 0.00%) fn get_size_of_ty<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option<(Span, Ty<'tcx>)> { 569 ( 0.00%) if let ExprKind::Call(count_func, []) = expr.kind 62 ( 0.00%) && let ExprKind::Path(ref count_func_qpath) = count_func.kind 62 ( 0.00%) && let QPath::Resolved(_, count_func_path) = count_func_qpath 48 ( 0.00%) && let Some(segment_zero) = count_func_path.segments.first() 72 ( 0.00%) && let Some(args) = segment_zero.args 11 ( 0.00%) && let Some(real_ty_span) = args.args.first().map(GenericArg::span) 55 ( 0.00%) && let Some(def_id) = cx.qpath_res(count_func_qpath, count_func.hir_id).opt_def_id() 253 ( 0.00%) => ???:::qpath_res (11x) 55 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::mem_size_of, def_id) 1,133 ( 0.00%) => ???:::is_diagnostic_item (11x) . { . cx.typeck_results() 33 ( 0.00%) .node_args(count_func.hir_id) 429 ( 0.00%) => ???:::node_args (11x) . .types() . .next() . .map(|resolved_ty| (real_ty_span, resolved_ty)) . } else { 227 ( 0.00%) None . } 1,428 ( 0.00%) } . . fn create_sugg(cx: &LateContext<'_>, expr: &Expr<'_>, base_sugg: String) -> String { . if let Some(parent_expr) = get_parent_expr(cx, expr) { . if is_ty_conversion(parent_expr) { . return base_sugg; . } . . // These expressions have precedence over casts, the suggestion therefore -- line 118 ---------------------------------------- 2,629 ( 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); . } . 18,040 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { 1,804 ( 0.00%) if cx.builder.lint_level_spec(MOD_MODULE_FILES).is_allow() 1,804 ( 0.00%) && cx.builder.lint_level_spec(SELF_NAMED_MODULE_FILES).is_allow() 1,804 ( 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); . }, . } . } 14,432 ( 0.00%) } . 18,040 ( 0.00%) fn check_item_post(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { 1,804 ( 0.00%) if cx.builder.lint_level_spec(MOD_MODULE_FILES).is_allow() 1,804 ( 0.00%) && cx.builder.lint_level_spec(SELF_NAMED_MODULE_FILES).is_allow() 1,804 ( 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); . } . }, . } . } 14,432 ( 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_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 16,104 ( 0.00%) pub fn current(self, cx: &LateContext<'_>) -> Option { 142,822 ( 0.00%) if SEEN_MSRV_ATTR.load(Ordering::Relaxed) { . self.for_attrs(cx.tcx, cx.last_node_with_lint_attrs) . } else { . self.0 . } 21,472 ( 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 { 16 ( 0.00%) if SEEN_MSRV_ATTR.load(Ordering::Relaxed) { . self.for_attrs(tcx, node) . } else { . self.0 . } . } . . fn for_attrs(self, tcx: TyCtxt<'_>, node: HirId) -> Option { . once(node) -- line 139 ---------------------------------------- -- line 141 ---------------------------------------- . .find_map(|id| parse_attrs(tcx.hir_attrs(id))) . .or(self.0) . } . . /// Checks if a required version from [this module](self) is met at the current node . /// . /// If the crate being linted uses an `#[clippy::msrv]` attribute this will search the parent . /// nodes for that attribute, prefer to run this check after cheaper pattern matching operations 687,265 ( 0.02%) pub fn meets(self, cx: &LateContext<'_>, required: RustcVersion) -> bool { 550,164 ( 0.02%) self.current(cx).is_none_or(|msrv| msrv >= required) 549,812 ( 0.02%) } . /// Checks if a required version from [this module](self) is met at the specified node . /// . /// If the crate being linted uses an `#[clippy::msrv]` attribute this will search the parent . /// nodes for that attribute, prefer to run this check after cheaper pattern matching operations . pub fn meets_at(self, tcx: TyCtxt<'_>, node: HirId, required: RustcVersion) -> bool { . self.at(tcx, node).is_none_or(|msrv| msrv >= required) . } . -- line 159 ---------------------------------------- -- line 232 ---------------------------------------- . } . . impl MsrvStack { . pub fn current(&self) -> Option { . self.stack.last().copied() . } . . pub fn meets(&self, required: RustcVersion) -> bool { 296,375 ( 0.01%) self.current().is_none_or(|msrv| msrv >= required) 59,275 ( 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); . } 430,012 ( 0.01%) } . . pub fn check_attributes_post(&mut self, attrs: &[Attribute]) { . if parse_attrs(attrs).is_some() { . self.stack.pop(); . } 430,012 ( 0.01%) } . } . . fn parse_attrs(attrs: &[impl AttributeExt]) -> Option { 1,382,448 ( 0.04%) let msrv_attr = attrs.iter().find(|attr| attr.path_matches(&[sym::clippy, sym::msrv]))?; 737,884 ( 0.02%) => ???:::path_matches (172,806x) . . let msrv = msrv_attr.value_str()?; . . parse_version(msrv) . } . 586,968 ( 0.02%) pub fn check_attrs(sess: &Session, attrs: &[impl AttributeExt]) { 115,812 ( 0.00%) let mut msrv_attrs = attrs.iter().filter(|attr| attr.path_matches(&[sym::clippy, sym::msrv])); 123,808 ( 0.00%) => ???:::path_matches (28,953x) . . 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")); . } 586,968 ( 0.02%) } 166,407 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/cfg_not_test.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . restriction, . "enforce against excluding code from test builds" . } . . declare_lint_pass!(CfgNotTest => [CFG_NOT_TEST]); . . impl EarlyLintPass for CfgNotTest { . fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &rustc_ast::Attribute) { 57,700 ( 0.00%) if let AttrKind::Synthetic(synthetic) = &attr.kind 2,032 ( 0.00%) && let SyntheticAttr::CfgTrace(cfg) = &**synthetic 1,492 ( 0.00%) && contains_not_test(cfg, false) 7,765 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/cfg_not_test.rs:clippy_lints::cfg_not_test::contains_not_test (373x) . { 12 ( 0.00%) span_lint_and_then( 705 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::check_attribute::{closure#0}> (1x) . cx, . CFG_NOT_TEST, . attr.span, . "code is excluded from test builds", . |diag| { . diag.help("consider not excluding any code from test builds"); . diag.note_once("this could increase code coverage despite not actually being tested"); . }, . ); . } . } . } . 1,688 ( 0.00%) fn contains_not_test(cfg: &CfgEntry, not: bool) -> bool { 2,487 ( 0.00%) match cfg { 219 ( 0.00%) CfgEntry::All(subs, _) | CfgEntry::Any(subs, _) => subs.iter().any(|item| contains_not_test(item, not)), 833 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/cfg_not_test.rs:clippy_lints::cfg_not_test::contains_not_test'2 (49x) 2 ( 0.00%) CfgEntry::Not(sub, _) => contains_not_test(sub, !not), 1,194 ( 0.00%) CfgEntry::NameValue { name: sym::test, .. } => not, . _ => false, . } 1,688 ( 0.00%) } 1 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/strlen_on_c_strings.rs -------------------------------------------------------------------------------- Ir -- line 45 ---------------------------------------- . . impl StrlenOnCStrings { . pub fn new(conf: &Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for StrlenOnCStrings { 497,168 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 143,328 ( 0.00%) if !expr.span.from_expansion() 7,345 ( 0.00%) && let ExprKind::Call(func, [recv]) = expr.kind 5,493 ( 0.00%) && let ExprKind::Path(path) = &func.kind 9,155 ( 0.00%) && let Some(did) = cx.qpath_res(path, func.hir_id).opt_def_id() 72,851 ( 0.00%) => ???:::qpath_res (1,831x) 8,680 ( 0.00%) && match_libc_symbol(cx, did, sym::strlen) 130,200 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::match_libc_symbol (1,736x) . && 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); . }, . ); . } 497,168 ( 0.01%) } . } 91,713 ( 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 136,716 ( 0.00%) if let ExprKind::Call(iter_expr, []) = &expr.kind 2,777 ( 0.00%) && let ExprKind::Path(QPath::TypeRelative(ty, _)) = &iter_expr.kind 981 ( 0.00%) && let TyKind::Path(ty_path) = &ty.kind 1,308 ( 0.00%) && let QPath::Resolved(None, path) = ty_path 981 ( 0.00%) && let def::Res::Def(_, def_id) = &path.res 3,270 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::IterEmpty, *def_id) 21,474 ( 0.00%) => ???:::is_diagnostic_item (327x) . && 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, . ); . } 497,168 ( 0.01%) } . } . . fn make_sugg( . cx: &LateContext<'_>, . ty_path: &QPath<'_>, . ctxt: SyntaxContext, . applicability: &mut Applicability, . path: &str, -- line 67 ---------------------------------------- 327 ( 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/fmt/mod.rs -------------------------------------------------------------------------------- Ir -- line 230 ---------------------------------------- . } . . impl SpecWriteFmt for &mut W { . #[inline] . fn spec_write_fmt(self, args: Arguments<'_>) -> Result { . if let Some(s) = args.as_statically_known_str() { . self.write_str(s) . } else { 8,668 ( 0.00%) write(self, args) 59,286 ( 0.00%) => ???:core::fmt::write (211x) . } . } . } . . self.spec_write_fmt(args) . } . } . -- line 246 ---------------------------------------- -- line 569 ---------------------------------------- . /// . /// If `write` is a reference to a formatter, it is recommended to use . /// [`Formatter::with_options`] instead as this can borrow the underlying . /// `write`, thereby bypassing one layer of indirection. . /// . /// You may alternatively use [`FormattingOptions::create_formatter()`]. . #[unstable(feature = "formatting_options", issue = "118117")] . pub const fn new(write: &'a mut (dyn Write + 'a), options: FormattingOptions) -> Self { 18,815 ( 0.00%) Formatter { options, buf: write } . } . . /// Creates a new formatter based on this one with given [`FormattingOptions`]. . #[unstable(feature = "formatting_options", issue = "118117")] . pub const fn with_options<'b>(&'b mut self, options: FormattingOptions) -> Formatter<'b> { . Formatter { options, buf: self.buf } . } . } -- line 585 ---------------------------------------- -- line 2124 ---------------------------------------- . /// assert_eq!(format!("{:0>8}", Foo(2)), "Foo 2"); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result { . if let Some(s) = fmt.as_statically_known_str() { . self.buf.write_str(s) . } else { 104 ( 0.00%) write(self.buf, fmt) 1,607 ( 0.00%) => ???:core::fmt::write (6x) . } . } . . /// Returns flags for formatting. . #[must_use] . #[stable(feature = "rust1", since = "1.0.0")] . #[deprecated( . since = "1.24.0", -- line 2140 ---------------------------------------- -- line 2879 ---------------------------------------- . . // Implementations of the core formatting traits . . macro_rules! fmt_refs { . ($($tr:ident),*) => { . $( . #[stable(feature = "rust1", since = "1.0.0")] . impl $tr for &T { 33,958 ( 0.00%) fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } 13,437 ( 0.00%) => ???:::fmt (1x) . } . #[stable(feature = "rust1", since = "1.0.0")] . impl $tr for &mut T { . fn fmt(&self, f: &mut Formatter<'_>) -> Result { $tr::fmt(&**self, f) } . } . )* . } . } -- line 2895 ---------------------------------------- 2,256 ( 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); 14,384 ( 0.00%) let mut preds = [Vec::new(), Vec::new(), Vec::new()]; . for (clause, _) in generics.clauses { 8,765 ( 0.00%) if let ClauseKind::Trait(poly_trait_pred) = clause.kind().skip_binder() { 24,542 ( 0.00%) => ???:::kind (1,753x) . let trait_pred = cx . .tcx 10,101 ( 0.00%) .instantiate_bound_regions_with_erased(clause.kind().rebind(poly_trait_pred)); 143,502 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased::> (1,443x) 20,202 ( 0.00%) => ???:::kind (1,443x) . for (i, tid) in trait_ids.iter().enumerate() { 5,940 ( 0.00%) if let Some(tid) = tid . && *tid == trait_pred.trait_ref.def_id . { . preds[i].push(trait_pred); . } . } . } . } 25,172 ( 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, _)| { 1,921 ( 0.00%) if let ClauseKind::Projection(pred) = clause.kind().skip_binder() { 4,438 ( 0.00%) => ???:::kind (317x) 588 ( 0.00%) let projection_pred = cx.tcx.instantiate_bound_regions_with_erased(clause.kind().rebind(pred)); 42,248 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased::> (84x) 1,176 ( 0.00%) => ???:::kind (84x) 84 ( 0.00%) if projection_pred.projection_term.args == trait_pred.trait_ref.args { 504 ( 0.00%) return Some(projection_pred); . } . } . None . }) . } . . fn get_args_to_check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'tcx>, . args_len: usize, . fn_mut_trait: DefId, . ord_trait: Option, . partial_ord_trait: Option, . ) -> Vec<(usize, Symbol)> { . let mut args_to_check = Vec::new(); 8,990 ( 0.00%) if let Some(def_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id) { 91,918 ( 0.00%) => ???:::type_dependent_def_id (1,798x) . let fn_sig = cx.tcx.fn_sig(def_id).instantiate_identity().skip_norm_wip(); . let generics = cx.tcx.clauses_of(def_id); 23,374 ( 0.00%) let [fn_mut_preds, ord_preds, partial_ord_preds] = 1,798 ( 0.00%) get_trait_predicates_for_trait_ids(cx, generics, &[Some(fn_mut_trait), ord_trait, partial_ord_trait]); 1,798 ( 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<'_>]` 168 ( 0.00%) let inputs_output = cx.tcx.instantiate_bound_regions_with_erased(fn_sig.inputs_and_output()); 68,801 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased::<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty>> (84x) . inputs_output . .iter() . .rev() . .skip(1) . .rev() . .enumerate() . .for_each(|(i, inp)| { . for trait_pred in &fn_mut_preds { 342 ( 0.00%) if trait_pred.self_ty() == inp 672 ( 0.00%) && let Some(return_ty_pred) = get_projection_pred(cx, generics, *trait_pred) . { . if ord_preds . .iter() 2 ( 0.00%) .any(|ord| Some(ord.self_ty()) == return_ty_pred.term.as_type()) 7 ( 0.00%) => ???:::as_type (1x) . { . args_to_check.push((i, sym::Ord)); . if args_to_check.len() == args_len - 1 { . break; . } . } else if partial_ord_preds . .iter() . .any(|pord| pord.self_ty() == return_ty_pred.term.expect_type()) -- line 122 ---------------------------------------- -- line 125 ---------------------------------------- . if args_to_check.len() == args_len - 1 { . break; . } . } . } . } . }); . } 420 ( 0.00%) args_to_check . } . . fn check_arg<'tcx>(cx: &LateContext<'tcx>, arg: &'tcx Expr<'tcx>) -> Option<(Span, Option)> { 6 ( 0.00%) if let ExprKind::Closure(&Closure { body, fn_decl_span, .. }) = arg.kind 6 ( 0.00%) && let ty::Closure(_def_id, args) = &cx.typeck_results().node_type(arg.hir_id).kind() 41 ( 0.00%) => ???:::node_type (1x) 1 ( 0.00%) && let ret_ty = args.as_closure().sig().output() 3 ( 0.00%) && let ty = cx.tcx.instantiate_bound_regions_with_erased(ret_ty) 27 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased:: (1x) . && ty.is_unit() . { . let body = cx.tcx.hir_body(body); . if let ExprKind::Block(block, _) = body.value.kind . && block.expr.is_none() . && let Some(stmt) = block.stmts.last() . && let StmtKind::Semi(_) = stmt.kind . { -- line 148 ---------------------------------------- -- line 153 ---------------------------------------- . Some((fn_decl_span, None)) . } . } else { . None . } . } . . impl<'tcx> LateLintPass<'tcx> for UnitReturnExpectingOrd { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 130,884 ( 0.00%) if let ExprKind::MethodCall(_, receiver, args, _) = expr.kind 5,692 ( 0.00%) && args.iter().any(|arg| { . matches!( . arg.peel_blocks().peel_borrows().peel_drop_temps().kind, . ExprKind::Path(_) | ExprKind::Closure(_) . ) . }) 8,990 ( 0.00%) && let Some(fn_mut_trait) = cx.tcx.lang_items().fn_mut_trait() 71,920 ( 0.00%) => ???:::lang_items (1,798x) . { 7,192 ( 0.00%) let ord_trait = cx.tcx.get_diagnostic_item(sym::Ord); 190,588 ( 0.01%) => ???:::get_diagnostic_item (1,798x) 3,596 ( 0.00%) let partial_ord_trait = cx.tcx.lang_items().partial_ord_trait(); 71,920 ( 0.00%) => ???:::lang_items (1,798x) . if (ord_trait, partial_ord_trait) == (None, None) { . return; . } . . let args = std::iter::once(receiver).chain(args.iter()).collect::>(); 3,596 ( 0.00%) let arg_indices = get_args_to_check(cx, expr, args.len(), fn_mut_trait, ord_trait, partial_ord_trait); 1 ( 0.00%) for (i, trait_name) in arg_indices { 1 ( 0.00%) 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 \ . the unit type which also implements {trait_name}" . ), -- line 188 ---------------------------------------- -- line 190 ---------------------------------------- . if let Some(last_semi) = last_semi { . diag.span_help(last_semi, "probably caused by this trailing semicolon"); . } . }, . ); . } . } . } 497,168 ( 0.01%) } . } 33,125 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs -------------------------------------------------------------------------------- Ir -- line 22 ---------------------------------------- . Block, . Unit, . NeedsPar(Cow<'tcx, str>, Applicability), . Expr(Cow<'tcx, str>, Applicability), . } . . impl RetReplacement<'_> { . fn sugg_help(&self) -> &'static str { 36 ( 0.00%) match self { . Self::Empty | Self::Expr(..) => "remove `return`", . Self::Block => "replace `return` with an empty block", . Self::Unit => "replace `return` with a unit value", . Self::NeedsPar(..) => "remove `return` and wrap the sequence with parentheses", . } . } . . fn applicability(&self) -> Applicability { 12 ( 0.00%) match self { 12 ( 0.00%) Self::Expr(_, ap) | Self::NeedsPar(_, ap) => *ap, . _ => Applicability::MachineApplicable, . } . } . } . . impl Display for RetReplacement<'_> { 6 ( 0.00%) fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 30 ( 0.00%) match self { . Self::Empty => f.write_str(""), . Self::Block => f.write_str("{}"), . Self::Unit => f.write_str("()"), . Self::NeedsPar(inner, _) => write!(f, "({inner})"), 30 ( 0.00%) Self::Expr(inner, _) => write!(f, "{inner}"), . } 12 ( 0.00%) } . } . . pub(super) fn check_fn<'tcx>(cx: &LateContext<'tcx>, kind: FnKind<'tcx>, body: &'tcx Body<'tcx>, sp: Span) { . if sp.from_expansion() { . return; . } . 4,534 ( 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) 554 ( 0.00%) let replacement = if let ExprKind::Ret(None) = &body.value.kind { . RetReplacement::Block . } else { . RetReplacement::Empty . }; 554 ( 0.00%) check_final_expr(cx, body.value, vec![], replacement, None); 38,632 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_final_expr (277x) . }, . FnKind::ItemFn(..) | FnKind::Method(..) => { 5,970 ( 0.00%) check_block_return(cx, &body.value.kind, sp, vec![]); 3,156,679 ( 0.09%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_block_return (1,990x) . }, . } . } . . // if `expr` is a block, check if there are needless returns in it 35,532 ( 0.00%) fn check_block_return<'tcx>(cx: &LateContext<'tcx>, expr_kind: &ExprKind<'tcx>, sp: Span, mut semi_spans: Vec) { 10,152 ( 0.00%) if let ExprKind::Block(block, _) = expr_kind { 9,768 ( 0.00%) if let Some(block_expr) = block.expr { 4,506 ( 0.00%) check_final_expr(cx, block_expr, semi_spans, RetReplacement::Empty, None); 374 ( 0.00%) } else if let Some(stmt) = block.stmts.last() { 925 ( 0.00%) if span_contains_cfg( 74,419 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::span_contains_cfg (138x) . cx, 555 ( 0.00%) Span::between( 27,186 ( 0.00%) => ???:::between (138x) 370 ( 0.00%) stmt.span, 370 ( 0.00%) cx.sess().source_map().end_point(block.span), // the closing brace of the block 59,606 ( 0.00%) => ???:::end_point (138x) . ), . ) { . return; . } 1,108 ( 0.00%) match stmt.kind { 1 ( 0.00%) StmtKind::Expr(expr) => { 4 ( 0.00%) check_final_expr(cx, expr, semi_spans, RetReplacement::Empty, None); . }, 182 ( 0.00%) StmtKind::Semi(semi_expr) => { . // Remove ending semicolons and any whitespace ' ' in between. . // Without `return`, the suggestion might not compile if the semicolon is retained 1,274 ( 0.00%) if let Some(semi_span) = stmt.span.trim_start(semi_expr.span) { 17,415 ( 0.00%) => ???:::trim_start (135x) . let semi_span_to_remove = 728 ( 0.00%) span_find_starting_semi(cx.sess().source_map(), semi_span.with_hi(sp.hi())); 94,380 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::span_find_starting_semi (135x) . semi_spans.push(semi_span_to_remove); . } 1,820 ( 0.00%) check_final_expr(cx, semi_expr, semi_spans, RetReplacement::Empty, None); . }, . _ => (), . } . } . } 39,184 ( 0.00%) } . 38,340 ( 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(); 250 ( 0.00%) match &peeled_drop_expr.kind { . // simple return is always "bad" . ExprKind::Ret(inner) => { . // check if expr return nothing 18 ( 0.00%) let ret_span = if inner.is_none() && replacement == RetReplacement::Empty { . extend_span_to_previous_non_ws(cx, peeled_drop_expr.span) . } else { 30 ( 0.00%) peeled_drop_expr.span . }; . 12 ( 0.00%) let replacement = if let Some(inner_expr) = inner { . // if desugar of `do yeet`, don't lint 21 ( 0.00%) if let ExprKind::Call(path_expr, [_]) = inner_expr.kind 18 ( 0.00%) && let ExprKind::Path(qpath) = path_expr.kind 21 ( 0.00%) && cx.tcx.qpath_is_lang_item(qpath, LangItem::TryTraitFromYeet) 353 ( 0.00%) => ???:::qpath_is_lang_item (3x) . { . return; . } . 6 ( 0.00%) let mut applicability = Applicability::MachineApplicable; 27 ( 0.00%) let (snippet, _) = snippet_with_context(cx, inner_expr.span, ret_span.ctxt(), "..", &mut applicability); 24 ( 0.00%) if binary_expr_needs_parentheses(inner_expr) { 7 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::binary_expr_needs_parentheses (1x) . RetReplacement::NeedsPar(snippet, applicability) . } else { . RetReplacement::Expr(snippet, applicability) . } . } else { . match match_ty_opt { . Some(match_ty) => { . match match_ty.kind() { -- line 153 ---------------------------------------- -- line 161 ---------------------------------------- . // want here . _ => return, . } . }, . None => replacement, . } . }; . 36 ( 0.00%) if inner.is_some_and(|inner| leaks_droppable_temporary_with_limited_lifetime(cx, inner)) { 156,956 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::leaks_droppable_temporary_with_limited_lifetime (1x) . return; . } . 12 ( 0.00%) if ret_span.from_expansion() || is_from_proc_macro(cx, expr) { . return; . } . . // Returns may be used to turn an expression into a statement in rustc's AST. . // This allows the addition of attributes, like `#[allow]` (See: clippy#9361) . // `#[expect(clippy::needless_return)]` needs to be handled separately to . // actually fulfill the expectation (clippy::#12998) 36 ( 0.00%) match cx.tcx.hir_attrs(expr.hir_id) { 61 ( 0.00%) => ???:::hir_attrs (1x) 24 ( 0.00%) [] => {}, . [attr] => { . if matches!(Level::from_opt_symbol(attr.name()), Some(Level::Expect)) . && let metas = attr.meta_item_list() . && let Some(lst) = metas . && let [MetaItemInner::MetaItem(meta_item), ..] = lst.as_slice() . && let [tool, lint_name] = meta_item.path.segments.as_slice() . && tool.ident.name == sym::clippy . && matches!( -- line 190 ---------------------------------------- -- line 195 ---------------------------------------- . // This is an expectation of the `needless_return` lint . } else { . return; . } . }, . _ => return, . } . 84 ( 0.00%) emit_return_lint( 946,782 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::emit_return_lint (1x) . cx, 6 ( 0.00%) peeled_drop_expr.span, . ret_span, . semi_spans, . &replacement, . expr.hir_id, . ); 6 ( 0.00%) }, 49 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue:: (1x) . ExprKind::If(_, then, else_clause_opt) => { 654 ( 0.00%) check_block_return(cx, &then.kind, peeled_drop_expr.span, semi_spans.clone()); 534,708 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_block_return'2 (59x) 327 ( 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. 623 ( 0.00%) check_final_expr(cx, else_clause, semi_spans, RetReplacement::Empty, match_ty_opt); 275,513 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_final_expr'2 (48x) . } . }, . // 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) => { 206 ( 0.00%) let match_ty = cx.typeck_results().expr_ty(peeled_drop_expr); 3,840 ( 0.00%) => ???:::expr_ty (96x) 103 ( 0.00%) for arm in *arms { 2,751 ( 0.00%) check_final_expr(cx, arm.body, semi_spans.clone(), RetReplacement::Unit, Some(match_ty)); 741,255 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_final_expr'2 (377x) . } . }, . // if it's a whole block, check it 29,770 ( 0.00%) other_expr_kind => check_block_return(cx, other_expr_kind, peeled_drop_expr.span, semi_spans), 48,369 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_block_return'2 (1,835x) 25,115 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/returns/needless_return.rs:clippy_lints::returns::needless_return::check_block_return (273x) . } 25,572 ( 0.00%) } . 72 ( 0.00%) fn emit_return_lint( . cx: &LateContext<'_>, . lint_span: Span, . ret_span: Span, . semi_spans: Vec, . replacement: &RetReplacement<'_>, . at: HirId, . ) { . span_lint_hir_and_then( . cx, 12 ( 0.00%) NEEDLESS_RETURN, . at, . lint_span, . "unneeded `return` statement", . |diag| { 6 ( 0.00%) let suggestions = std::iter::once((ret_span, replacement.to_string())) . .chain(semi_spans.into_iter().map(|span| (span, String::new()))) . .collect(); . . diag.multipart_suggestion(replacement.sugg_help(), suggestions, replacement.applicability()); . }, . ); 48 ( 0.00%) } . . // Go backwards while encountering whitespace and extend the given Span to that point. . fn extend_span_to_previous_non_ws(cx: &LateContext<'_>, sp: Span) -> Span { . if let Ok(prev_source) = cx.sess().source_map().span_to_prev_source(sp) { . let ws = *b" \t\n"; . if let Some(non_ws_pos) = prev_source.bytes().rposition(|c| !ws.contains(&c)) { . let len = prev_source.len() - non_ws_pos - 1; . return sp.with_lo(sp.lo() - BytePos::from_usize(len)); -- line 265 ---------------------------------------- 21,024 ( 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 { 559,314 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 124,292 ( 0.00%) if let ExprKind::Binary(ref op, l, r) = expr.kind 1,690 ( 0.00%) && matches!( 3,380 ( 0.00%) op.node, . BinOpKind::And | BinOpKind::BitAnd | BinOpKind::Or | BinOpKind::BitOr . ) 1,980 ( 0.00%) && self.msrv.meets(cx, msrvs::RANGE_CONTAINS) 8,910 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (330x) 1,320 ( 0.00%) && !is_in_const_context(cx) 111,666 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (330x) . { 2,240 ( 0.00%) check_possible_range_contains(cx, op.node, l, r, expr, expr.span); 422,205 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/ranges.rs:clippy_lints::ranges::check_possible_range_contains (320x) . } . 373,980 ( 0.01%) if let Some(range) = higher::Range::hir(cx, expr) { 3,017,719 ( 0.08%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (62,146x) . check_exclusive_range_plus_one(cx, expr, &range); . check_inclusive_range_minus_one(cx, expr, &range); . check_reversed_empty_range(cx, expr, &range); . } 497,168 ( 0.01%) } . } . 3,393 ( 0.00%) fn check_possible_range_contains( . cx: &LateContext<'_>, . op: BinOpKind, . left: &Expr<'_>, . right: &Expr<'_>, . expr: &Expr<'_>, . span: Span, . ) { 3,770 ( 0.00%) let combine_and = match op { . BinOpKind::And | BinOpKind::BitAnd => true, . BinOpKind::Or | BinOpKind::BitOr => false, . _ => return, . }; . // value, name, order (higher/lower), inclusiveness 12,151 ( 0.00%) if let (Some(l), Some(r)) = (check_range_bounds(cx, left), check_range_bounds(cx, right)) { 27,340 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/ranges.rs:clippy_lints::ranges::check_range_bounds (640x) . // we only lint comparisons on the same name and with different . // direction 5 ( 0.00%) if l.id != r.id || l.ord == r.ord { . return; . } 16 ( 0.00%) let ord = Constant::partial_cmp(cx.tcx, cx.typeck_results().expr_ty(l.expr), &l.val, &r.val); 40 ( 0.00%) => ???:::expr_ty (1x) 55 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::partial_cmp (1x) 4 ( 0.00%) if combine_and && ord == Some(r.ord) { . // order lower bound and upper bound . let (l_span, u_span, l_inc, u_inc) = if r.ord == Ordering::Less { . (l.val_span, r.val_span, l.inc, r.inc) . } else { . (r.val_span, l.val_span, r.inc, l.inc) . }; . // we only lint inclusive lower bounds 6 ( 0.00%) if !l_inc { . return; . } 14 ( 0.00%) let (range_type, range_op) = if u_inc { . ("RangeInclusive", "..=") . } else { . ("Range", "..") . }; 1 ( 0.00%) let mut applicability = Applicability::MachineApplicable; 1 ( 0.00%) let name = snippet_with_applicability(cx, l.name_span, "_", &mut applicability); . let lo = snippet_with_applicability(cx, l_span, "_", &mut applicability); . let hi = snippet_with_applicability(cx, u_span, "_", &mut applicability); 6 ( 0.00%) let space = if lo.ends_with('.') { " " } else { "" }; 15 ( 0.00%) span_lint_and_sugg( 274,773 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_sugg:: (1x) . cx, . MANUAL_RANGE_CONTAINS, . span, 3 ( 0.00%) format!("manual `{range_type}::contains` implementation"), . "use", 16 ( 0.00%) format!("({lo}{space}{range_op}{hi}).contains(&{name})"), . applicability, . ); . } else if !combine_and && ord == Some(l.ord) { . // For floating-point types, `q < lo || q > hi` evaluates to `false` for NaN, . // but `!(lo..=hi).contains(&q)` evaluates to `true` for NaN, so not linting. 6 ( 0.00%) if matches!(cx.typeck_results().expr_ty(l.expr).kind(), ty::Float(_)) { 40 ( 0.00%) => ???:::expr_ty (1x) . return; . } . // `!_.contains(_)` . // order lower bound and upper bound . let (l_span, u_span, l_inc, u_inc) = if l.ord == Ordering::Less { . (l.val_span, r.val_span, l.inc, r.inc) . } else { . (r.val_span, l.val_span, r.inc, l.inc) . }; 6 ( 0.00%) if l_inc { . return; . } . let (range_type, range_op) = if u_inc { . ("Range", "..") . } else { . ("RangeInclusive", "..=") . }; . let mut applicability = Applicability::MachineApplicable; -- line 284 ---------------------------------------- -- line 291 ---------------------------------------- . MANUAL_RANGE_CONTAINS, . span, . format!("manual `!{range_type}::contains` implementation"), . "use", . format!("!({lo}{space}{range_op}{hi}).contains(&{name})"), . applicability, . ); . } 748 ( 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 750 ( 0.00%) if let ExprKind::Binary(ref lhs_op, _left, new_lhs) = left.kind 200 ( 0.00%) && op == lhs_op.node 570 ( 0.00%) && let new_span = Span::new(new_lhs.span.lo(), right.span.hi(), expr.span.ctxt(), expr.span.parent()) . && new_span.check_text(cx, |src| { . // Do not continue if we have mismatched number of parens, otherwise the suggestion is wrong 114 ( 0.00%) src.matches('(').count() == src.matches(')').count() . }) . { 285 ( 0.00%) check_possible_range_contains(cx, op, new_lhs, right, expr, new_span); 287,528 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/ranges.rs:clippy_lints::ranges::check_possible_range_contains'2 (57x) . } 3,016 ( 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 5,278 ( 0.00%) fn check_range_bounds<'a>(cx: &'a LateContext<'_>, ex: &'a Expr<'_>) -> Option> { 1,508 ( 0.00%) if let ExprKind::Binary(ref op, l, r) = ex.kind { 3,794 ( 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() { 520 ( 0.00%) if let Some(c) = ConstEvalCtxt::new(cx).eval(r) { 7,338 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (64x) 3,584 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (64x) 108 ( 0.00%) return Some(RangeBounds { . val: c, . expr: r, . id, 18 ( 0.00%) name_span: l.span, 36 ( 0.00%) val_span: r.span, . ord: ordering, . inc: inclusive, . }); . } . } else if let Some(id) = r.res_local_id() 85 ( 0.00%) && let Some(c) = ConstEvalCtxt::new(cx).eval(l) 1,565 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (11x) 616 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (11x) . { 14 ( 0.00%) return Some(RangeBounds { . val: c, . expr: l, . id, 2 ( 0.00%) name_span: r.span, 4 ( 0.00%) val_span: l.span, . ord: ordering.reverse(), . inc: inclusive, . }); . } . } . None 6,032 ( 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. 88 ( 0.00%) fn can_switch_ranges<'tcx>( . cx: &LateContext<'tcx>, . ctxt: SyntaxContext, . expr: &'tcx Expr<'_>, . original: RangeLimits, . inner_ty: Ty<'tcx>, . ) -> bool { 55 ( 0.00%) let use_site = get_expr_use_site(cx.tcx, cx.typeck_results(), ctxt, expr); 3,573 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_site (11x) 55 ( 0.00%) let (Node::Expr(parent_expr), false) = (use_site.node, use_site.is_ty_unified) else { . return false; . }; . . // Check if `expr` is the argument of a compiler-generated `IntoIter::into_iter(expr)` 68 ( 0.00%) if let ExprKind::Call(func, [arg]) = parent_expr.kind 8 ( 0.00%) && arg.hir_id == use_site.child_id 64 ( 0.00%) && let ExprKind::Path(qpath) = func.kind 40 ( 0.00%) && cx.tcx.qpath_is_lang_item(qpath, LangItem::IntoIterIntoIter) 112 ( 0.00%) => ???:::qpath_is_lang_item (8x) . && parent_expr.span.is_desugaring(DesugaringKind::ForLoop) . { . return true; . } . . // Check if `expr` is used as the receiver of a method of the `Iterator`, `IntoIterator`, . // or `RangeBounds` traits. 30 ( 0.00%) if let ExprKind::MethodCall(_, receiver, _, _) = parent_expr.kind . && receiver.hir_id == use_site.child_id . && let Some(method_did) = cx.typeck_results().type_dependent_def_id(parent_expr.hir_id) . && let Some(trait_did) = cx.tcx.trait_of_assoc(method_did) . && matches!( . cx.tcx.get_diagnostic_name(trait_did), . Some(sym::Iterator | sym::IntoIterator | sym::RangeBounds) . ) . { . return true; . } . . // Check if `expr` is an argument of a call which requires an `Iterator`, `IntoIterator`, . // or `RangeBounds` trait. 55 ( 0.00%) if let ExprKind::Call(_, args) | ExprKind::MethodCall(_, _, args, _) = parent_expr.kind 40 ( 0.00%) && let Some(id) = fn_def_id(cx, parent_expr) 472 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id (8x) . && let Some(arg_idx) = args.iter().position(|e| e.hir_id == use_site.child_id) . { . let input_idx = if matches!(parent_expr.kind, ExprKind::MethodCall(..)) { . arg_idx + 1 . } else { . arg_idx . }; . let inputs = cx -- line 419 ---------------------------------------- -- line 448 ---------------------------------------- . }) . { . return true; . } . } . . // Check if `expr` is used for indexing, and if the switched range type could be used . // as well. 33 ( 0.00%) if let ExprKind::Index(outer_expr, index, _) = parent_expr.kind 3 ( 0.00%) && index.hir_id == expr.hir_id . // Build the switched range type (for example `RangeInclusive`). 3 ( 0.00%) && let Some(switched_range_def_id) = match original { . RangeLimits::HalfOpen => cx.tcx.lang_items().range_inclusive_struct(), . RangeLimits::Closed => cx.tcx.lang_items().range_struct(), . } . && let switched_range_ty = cx . .tcx . .type_of(switched_range_def_id) 3 ( 0.00%) .instantiate(cx.tcx, &[inner_ty.into()]) . .skip_norm_wip() . // Check that the switched range type can be used for indexing the original expression . // through the `Index` or `IndexMut` trait. 15 ( 0.00%) && let ty::Ref(_, outer_ty, mutability) = cx.typeck_results().expr_ty_adjusted(outer_expr).kind() 159 ( 0.00%) => ???:::expr_ty_adjusted (3x) 9 ( 0.00%) && let Some(index_def_id) = match mutability { . Mutability::Not => cx.tcx.lang_items().index_trait(), . Mutability::Mut => cx.tcx.lang_items().index_mut_trait(), . } 24 ( 0.00%) && implements_trait(cx, *outer_ty, index_def_id, &[switched_range_ty.into()]) 511,417 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (3x) . // We could also check that the associated item of the `index_def_id` trait with the switched range type . // return the same type, but it is reasonable to expect so. We can't check that the result is identical . // in both `Index>` and `Index>` anyway. . { . return true; . } . . false 94 ( 0.00%) } . . // exclusive range plus one: `x..(y+1)` . fn check_exclusive_range_plus_one<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, range: &higher::Range<'tcx>) { . check_range_switch( . cx, . expr, . range, . RangeLimits::HalfOpen, -- line 492 ---------------------------------------- -- line 515 ---------------------------------------- . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . range: &higher::Range<'tcx>, . kind: RangeLimits, . predicate: impl for<'hir> FnOnce(&Expr<'hir>) -> Option<&'hir Expr<'hir>>, . lint: &'static Lint, . msg: &'static str, . ) { 368 ( 0.00%) if let higher::Range { 380 ( 0.00%) start, . end: Some(end), . ty, 380 ( 0.00%) span, 368 ( 0.00%) } = *range 1,520 ( 0.00%) && span.can_be_used_for_suggestions() 11,000 ( 0.00%) => ???:::can_be_used_for_suggestions (380x) . && ty.limits() == kind . && let Some(y) = predicate(end) 102 ( 0.00%) && can_switch_ranges(cx, span.ctxt(), expr, kind, cx.typeck_results().expr_ty(y)) 519,597 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/ranges.rs:clippy_lints::ranges::can_switch_ranges (11x) 440 ( 0.00%) => ???:::expr_ty (11x) . { . // Suggest the opposite range limits to the ones being checked. . let operator = match kind { 12 ( 0.00%) RangeLimits::HalfOpen => "..=", . RangeLimits::Closed => "..", . }; 51 ( 0.00%) span_lint_and_then(cx, lint, span, msg, |diag| { 3,983 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::{closure#0}> (3x) . let mut app = Applicability::MachineApplicable; . let start = start.map_or(String::new(), |x| { . Sugg::hir_with_context(cx, x, span.ctxt(), "", &mut app) . .maybe_paren() . .to_string() . }); . let end = Sugg::hir_with_context(cx, y, span.ctxt(), "", &mut app).maybe_paren(); . match span.with_source_text(cx, |src| src.starts_with('(') && src.ends_with(')')) { -- line 547 ---------------------------------------- -- line 582 ---------------------------------------- . . fn is_empty_range(limits: RangeLimits, ordering: Ordering) -> bool { . match limits { . RangeLimits::HalfOpen => ordering != Ordering::Less, . RangeLimits::Closed => ordering == Ordering::Greater, . } . } . 190 ( 0.00%) if let higher::Range { . start: Some(start), . end: Some(end), 133 ( 0.00%) ty: range_ty, 133 ( 0.00%) span, 190 ( 0.00%) } = *range 399 ( 0.00%) && let ty = cx.typeck_results().expr_ty(start) 5,332 ( 0.00%) => ???:::expr_ty (133x) 532 ( 0.00%) && let ty::Int(_) | ty::Uint(_) = ty.kind() 532 ( 0.00%) && let ecx = ConstEvalCtxt::new(cx) 7,448 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (133x) 1,022 ( 0.00%) && let Some(start_idx) = ecx.eval(start) 19,570 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (133x) 252 ( 0.00%) && let Some(end_idx) = ecx.eval(end) 5,636 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (51x) 144 ( 0.00%) && let Some(ordering) = Constant::partial_cmp(cx.tcx, ty, &start_idx, &end_idx) 706 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::partial_cmp (12x) 18 ( 0.00%) && is_empty_range(range_ty.limits(), ordering) . { . if inside_indexing_expr(cx, expr) { . // Avoid linting `N..N` as it has proven to be useful, see #5689 and #5628 ... . if ordering != Ordering::Equal { . span_lint( . cx, . REVERSED_EMPTY_RANGES, . span, -- line 610 ---------------------------------------- -- line 633 ---------------------------------------- . range in reverse", . format!("({end_snippet}{dots}{start_snippet}).rev()"), . Applicability::MaybeIncorrect, . ); . } . }, . ); . } 63 ( 0.00%) } 1,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:: (63x) . } . . fn y_plus_one<'tcx>(expr: &Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { 322 ( 0.00%) match expr.kind { . ExprKind::Binary( . Spanned { . node: BinOpKind::Add, .. . }, 8 ( 0.00%) lhs, 8 ( 0.00%) rhs, . ) => { 2 ( 0.00%) if is_integer_literal(lhs, 1) { . Some(rhs) 2 ( 0.00%) } else if is_integer_literal(rhs, 1) { . Some(lhs) . } else { . None . } . }, . _ => None, . } . } . . fn y_minus_one<'tcx>(expr: &Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { 96 ( 0.00%) match expr.kind { . ExprKind::Binary( . Spanned { . node: BinOpKind::Sub, .. . }, 8 ( 0.00%) lhs, . rhs, 17 ( 0.00%) ) if is_integer_literal(rhs, 1) => Some(lhs), . _ => None, . } . } 71,812 ( 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 99,336 ( 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. 31,314 ( 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 { 119 ( 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. . // 8,033 ( 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"). 25 ( 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 { 268,696 ( 0.01%) match *self { 153,016 ( 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 { 60 ( 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 ---------------------------------------- 76,984 ( 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 34 ---------------------------------------- . #[stable(feature = "rust1", since = "1.0.0")] . impl<'a> Iterator for Chars<'a> { . type Item = char; . . #[inline] . fn next(&mut self) -> Option { . // SAFETY: `str` invariant says `self.iter` is a valid UTF-8 string and . // the resulting `ch` is a valid Unicode Scalar Value. 5 ( 0.00%) unsafe { next_code_point(&mut self.iter).map(|ch| char::from_u32_unchecked(ch)) } 50 ( 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:core::str::validations::next_code_point::> (5x) . } . . #[inline] . fn count(self) -> usize { . super::count::count_chars(self.as_str()) . } . . #[inline] -- line 50 ---------------------------------------- -- 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(); 185,595 ( 0.01%) self.front_offset += pre_len - len; . Some((index, ch)) . } . } . } . . #[inline] . fn count(self) -> usize { . self.iter.count() -- line 197 ---------------------------------------- -- line 504 ---------------------------------------- . } . . $(#[$common_stability_attribute])* . impl<'a, P: Pattern> Iterator for $forward_iterator<'a, P> { . type Item = $iterty; . . #[inline] . fn next(&mut self) -> Option<$iterty> { 2 ( 0.00%) self.0.next() 498 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/iter.rs:>::next (2x) . } . } . . $(#[$common_stability_attribute])* . impl<'a, P> Clone for $forward_iterator<'a, P> . where . P: Pattern: Clone>, . { -- line 520 ---------------------------------------- -- 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> { 2,430 ( 0.00%) self.0.next_back() 148,836 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/iter.rs:>::next_back (2,412x) . } . } . . $(#[$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 { 1,010 ( 0.00%) self.finished = true; . 582 ( 0.00%) if self.allow_trailing_empty || self.end - self.start > 0 { . // SAFETY: `self.start` and `self.end` always lie on unicode boundaries. 562 ( 0.00%) let string = unsafe { self.matcher.haystack().get_unchecked(self.start..self.end) }; . return Some(string); . } . } . . None . } . . #[inline] 14 ( 0.00%) fn next(&mut self) -> Option<&'a str> { 6,202 ( 0.00%) if self.finished { . return None; . } . 1,788 ( 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 { 219 ( 0.00%) let elt = haystack.get_unchecked(self.start..a); 233 ( 0.00%) self.start = b; . Some(elt) 210 ( 0.00%) }, 1,526 ( 0.00%) None => self.get_end(), . } 18 ( 0.00%) } . . #[inline] . fn next_inclusive(&mut self) -> Option<&'a str> { 37,756 ( 0.00%) if self.finished { . return None; . } . 1,620 ( 0.00%) 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 { 630 ( 0.00%) let elt = haystack.get_unchecked(self.start..b); 630 ( 0.00%) self.start = b; . Some(elt) 630 ( 0.00%) }, 4,450 ( 0.00%) None => self.get_end(), . } . } . . #[inline] 17,010 ( 0.00%) fn next_back(&mut self) -> Option<&'a str> . where . P::Searcher<'a>: ReverseSearcher<'a>, . { 4,860 ( 0.00%) if self.finished { . return None; . } . 2,528 ( 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; . } . } . } . } . 3,792 ( 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 { 76 ( 0.00%) let elt = haystack.get_unchecked(b..self.end); 76 ( 0.00%) self.end = a; . Some(elt) . }, . // SAFETY: `self.start` and `self.end` always lie on unicode boundaries. . None => unsafe { 1,188 ( 0.00%) self.finished = true; 2,376 ( 0.00%) Some(haystack.get_unchecked(self.start..self.end)) . }, . } 19,516 ( 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 ---------------------------------------- -- line 1161 ---------------------------------------- . #[derive(Clone, Debug)] . pub struct Lines<'a>(pub(super) Map, LinesMap>); . . #[stable(feature = "rust1", since = "1.0.0")] . impl<'a> Iterator for Lines<'a> { . type Item = &'a str; . . #[inline] 6,930 ( 0.00%) fn next(&mut self) -> Option<&'a str> { . self.0.next() 8,910 ( 0.00%) } . . #[inline] . fn size_hint(&self) -> (usize, Option) { . self.0.size_hint() . } . . #[inline] . fn last(mut self) -> Option<&'a str> { -- line 1179 ---------------------------------------- 61,884 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_retain.rs -------------------------------------------------------------------------------- Ir -- line 52 ---------------------------------------- . . impl ManualRetain { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualRetain { 310,730 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 124,292 ( 0.00%) if let Assign(left_expr, collect_expr, _) = &expr.kind 2,105 ( 0.00%) && let hir::ExprKind::MethodCall(seg, target_expr, [], _) = &collect_expr.kind 46 ( 0.00%) && seg.args.is_none() 115 ( 0.00%) && let Some(collect_def_id) = cx.typeck_results().type_dependent_def_id(collect_expr.hir_id) 1,185 ( 0.00%) => ???:::type_dependent_def_id (23x) 138 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::iterator_collect_fn, collect_def_id) 2,026 ( 0.00%) => ???:::is_diagnostic_item (23x) . { . 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); . } 372,876 ( 0.01%) } . } . . fn check_into_iter( . cx: &LateContext<'_>, . left_expr: &hir::Expr<'_>, . target_expr: &hir::Expr<'_>, . parent_expr_span: Span, . msrv: Msrv, -- line 79 ---------------------------------------- 46 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unwrap.rs -------------------------------------------------------------------------------- Ir -- line 170 ---------------------------------------- . impl Local { . fn snippet(&self, cx: &LateContext<'_>) -> Cow<'static, str> { . match *self { . Self::WithFieldAccess { span, .. } => snippet(cx.sess(), span, "_"), . Self::Pure { local_id } => cx.tcx.hir_name(local_id).to_string().into(), . } . } . 125 ( 0.00%) fn is_potentially_local_place(&self, place: &Place<'_>) -> bool { 50 ( 0.00%) match self { . Self::WithFieldAccess { . local_id, . field_indices, . .. . } => { . let field_projections = place . .projections . .iter() 20 ( 0.00%) .filter(|proj| matches!(proj.kind, ProjectionKind::Field(_, _))) . .collect::>(); 14 ( 0.00%) is_potentially_local_place(*local_id, place) . // If there were projections other than field projections, err on the side of caution and say that they . // _might_ be mutating something. . // . // The reason we use `<=` and not `==` is that a mutation of `struct` or `struct.field1` should count as . // mutation of the child fields such as `struct.field1.field2` 24 ( 0.00%) && field_projections.len() <= field_indices.len() 36 ( 0.00%) && iter::zip(&field_projections, field_indices.iter().copied().rev()).all(|(proj, field_idx)| { 36 ( 0.00%) match proj.kind { . ProjectionKind::Field(f_idx, _) => f_idx == field_idx, . // If this is a projection we don't expect, it _might_ be mutating something . _ => false, . } . }) . }, 10 ( 0.00%) Self::Pure { local_id } => is_potentially_local_place(*local_id, place), . } 125 ( 0.00%) } . } . . /// Contains information about whether a variable can be unwrapped. . #[derive(Clone, Debug)] . struct UnwrapInfo<'tcx> { . /// The variable that is checked . local: Local, . /// The if itself -- line 215 ---------------------------------------- -- line 236 ---------------------------------------- . if_expr: &'tcx Expr<'_>, . expr: &'tcx Expr<'_>, . branch: &'tcx Expr<'_>, . invert: bool, . is_entire_condition: bool, . ) -> Vec> { . fn option_or_result_call(cx: &LateContext<'_>, ty: Ty<'_>, method_name: Symbol) -> Option<(UnwrappableKind, bool)> { . match (ty.opt_diag_name(cx)?, method_name) { 64 ( 0.00%) (sym::Option, sym::is_some) => Some((UnwrappableKind::Option, true)), 23 ( 0.00%) (sym::Option, sym::is_none) => Some((UnwrappableKind::Option, false)), 2 ( 0.00%) (sym::Result, sym::is_ok) => Some((UnwrappableKind::Result, true)), . (sym::Result, sym::is_err) => Some((UnwrappableKind::Result, false)), . _ => None, . } . } . 19,390 ( 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>, . ) { 13,853 ( 0.00%) match expr.kind { 194 ( 0.00%) ExprKind::Binary(op, left, right) 2,104 ( 0.00%) if matches!( 1,370 ( 0.00%) (invert, op.node), . (false, BinOpKind::And | BinOpKind::BitAnd) | (true, BinOpKind::Or | BinOpKind::BitOr) . ) => . { 679 ( 0.00%) inner(cx, if_expr, left, branch, invert, false, out); 10,423 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:clippy_lints::unwrap::collect_unwrap_info::inner'2 (80x) . inner(cx, if_expr, right, branch, invert, false, out); . }, 666 ( 0.00%) ExprKind::Unary(UnOp::Not, expr) => inner(cx, if_expr, expr, branch, !invert, false, out), 1,699 ( 0.00%) ExprKind::MethodCall(method_name, receiver, [], _) 4,758 ( 0.00%) if let Some(local) = extract_local(cx, receiver) 23,697 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:clippy_lints::unwrap::extract_local (381x) 323 ( 0.00%) && let ty = cx.typeck_results().expr_ty(receiver) 11,680 ( 0.00%) => ???:::expr_ty (292x) . && let name = method_name.ident.name 360 ( 0.00%) && let Some((kind, unwrappable)) = option_or_result_call(cx, ty, name) => . { . let safe_to_unwrap = unwrappable != invert; . 649 ( 0.00%) out.push(UnwrapInfo { . local, . if_expr, . check: expr, . check_name: name, . branch, . safe_to_unwrap, . kind, . is_entire_condition, . }); . }, . _ => {}, . } 10,656 ( 0.00%) } . . let mut out = vec![]; 5,152 ( 0.00%) inner(cx, if_expr, expr, branch, invert, is_entire_condition, &mut out); 88,822 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:clippy_lints::unwrap::collect_unwrap_info::inner (947x) 3,864 ( 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`]) 53,208 ( 0.00%) fn extract_local(cx: &LateContext<'_>, mut expr: &Expr<'_>) -> Option { 6,651 ( 0.00%) let span = expr.span; . let mut field_indices = vec![]; 40,515 ( 0.00%) while let ExprKind::Field(recv, _) = expr.kind 10,164 ( 0.00%) && let Some(field_idx) = cx.typeck_results().opt_field_index(expr.hir_id) 56,820 ( 0.00%) => ???:::opt_field_index (1,452x) . { . field_indices.push(field_idx); . expr = recv; . } . let local_id = expr.res_local_id()?; 5,029 ( 0.00%) if field_indices.is_empty() { 11,082 ( 0.00%) Some(Local::Pure { local_id }) . } else { 5,340 ( 0.00%) Some(Local::WithFieldAccess { . local_id, 5,340 ( 0.00%) field_indices, . span, . }) . } 54,543 ( 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 347 ---------------------------------------- . path.ident.name == sym::as_mut . } else { . false . } . } . . impl<'tcx> Delegate<'tcx> for MutationVisitor<'tcx, '_> { . fn borrow(&mut self, cat: &PlaceWithHirId<'tcx>, diag_expr_id: HirId, bk: ty::BorrowKind) { 73 ( 0.00%) if let ty::BorrowKind::Mutable = bk 55 ( 0.00%) && self.local.is_potentially_local_place(&cat.place) 432 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:::is_potentially_local_place (11x) . && !is_as_mut_use(self.tcx, diag_expr_id) . { . self.is_mutated = true; . } . } . . fn mutate(&mut self, cat: &PlaceWithHirId<'tcx>, _: HirId) { 74 ( 0.00%) if self.local.is_potentially_local_place(&cat.place) { 2,015 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:::is_potentially_local_place (12x) 6 ( 0.00%) self.is_mutated = true; . } . } . . 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> { 11,592 ( 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(); 9,280 ( 0.00%) for unwrap_info in collect_unwrap_info(self.cx, if_expr, cond, branch, else_branch, true) { 96 ( 0.00%) let mut delegate = MutationVisitor { . is_mutated: false, . local: &unwrap_info.local, 48 ( 0.00%) tcx: self.cx.tcx, . }; . . let vis = ExprUseVisitor::for_clippy(self.cx, cond.hir_id.owner.def_id, &mut delegate); 72 ( 0.00%) vis.walk_expr(cond).into_ok(); 37,357 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::walk_expr (21x) 72 ( 0.00%) vis.walk_expr(branch).into_ok(); 2,082,531 ( 0.06%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::walk_expr (21x) . 48 ( 0.00%) 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; . } 216 ( 0.00%) self.unwrappables.push(unwrap_info); . } 3,864 ( 0.00%) walk_expr(self, branch); 1,339,306 ( 0.04%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::'2 (947x) . self.unwrappables.truncate(prev_len); 10,304 ( 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) { 16,356 ( 0.00%) if let ExprKind::MethodCall(path, recv, [], _) = expr.kind { 752 ( 0.00%) match path.ident.name { 2,955 ( 0.00%) sym::as_ref => (recv, Some(AsRefKind::AsRef)), 25 ( 0.00%) sym::as_mut => (recv, Some(AsRefKind::AsMut)), . _ => (expr, None), . } . } else { . (expr, None) . } . } . . impl<'tcx> Visitor<'tcx> for UnwrappableVariablesVisitor<'_, 'tcx> { . type NestedFilter = nested_filter::OnlyBodies; . 468,216 ( 0.01%) fn visit_expr(&mut self, expr: &'tcx Expr<'_>) { . // Skip checking inside closures since they are visited through `Unwrap::check_fn()` already. 338,694 ( 0.01%) if matches!(expr.kind, ExprKind::Closure(_)) { . return; . } . if let Some(higher::If { cond, then, r#else }) = higher::If::hir(expr) { 3,129 ( 0.00%) walk_expr(self, cond); 364,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/intravisit.rs:rustc_hir::intravisit::walk_expr::'2 (1,043x) 6,258 ( 0.00%) self.visit_branch(expr, cond, then, false); 3,276,742 ( 0.09%) => site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:::visit_branch (778x) 479,716 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:::visit_branch'2 (265x) 2,086 ( 0.00%) if let Some(else_inner) = r#else { 3,185 ( 0.00%) self.visit_branch(expr, cond, else_inner, true); 344,712 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:::visit_branch (169x) 254,887 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:::visit_branch'2 (76x) . } . } else { . // find `unwrap[_err]()` or `expect("...")` calls: 6,230 ( 0.00%) if let ExprKind::MethodCall(method_name, self_arg, ..) = expr.kind 6,230 ( 0.00%) && let (self_arg, as_ref_kind) = consume_option_as_ref(self_arg) 62,434 ( 0.00%) && let Some(local) = extract_local(self.cx, self_arg) 6,007 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unwrap.rs:clippy_lints::unwrap::extract_local (103x) 32,926 ( 0.00%) && matches!(method_name.ident.name, sym::unwrap | sym::expect | sym::unwrap_err) 168 ( 0.00%) && 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()) . { . if call_to_unwrap == unwrappable.safe_to_unwrap { -- line 455 ---------------------------------------- -- 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"); . }, . ); . } . } 152,112 ( 0.00%) walk_expr(self, expr); 7,570,422 ( 0.21%) => /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,274x) . } 414,232 ( 0.01%) } . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { 2,289 ( 0.00%) self.cx.tcx . } . } . . impl<'tcx> LateLintPass<'tcx> for Unwrap { 19,747 ( 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; . } . 11,335 ( 0.00%) let mut v = UnwrappableVariablesVisitor { . unwrappables: Vec::new(), . cx, 2,267 ( 0.00%) msrv: self.msrv, . }; . 9,068 ( 0.00%) walk_fn(&mut v, kind, decl, body.id(), fn_id); 8,458,727 ( 0.23%) => /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:: (2,267x) 14,105 ( 0.00%) } . } 33,413 ( 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. 49,149 ( 0.00%) fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx hir::Block<'tcx>) { 5,461 ( 0.00%) let fn_def_id = block.hir_id.owner.to_def_id(); 32,766 ( 0.00%) if let Some(impl_id) = cx.tcx.trait_impl_of_assoc(fn_def_id) { 723,695 ( 0.02%) => ???:::trait_impl_of_assoc (5,461x) . 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 12,072 ( 0.00%) if let Some(trait_name) = cx.tcx.get_diagnostic_name(trait_id) 120,886 ( 0.00%) => ???:::get_diagnostic_name (1,509x) . && 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; . } . } . 5,461 ( 0.00%) for stmt in block.stmts { 13,958 ( 0.00%) if let hir::StmtKind::Semi(exp) = stmt.kind { 5,036 ( 0.00%) check_expr(cx, exp); 240,049 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/unused_io_amount.rs:clippy_lints::unused_io_amount::check_expr (2,518x) . } . } . 16,383 ( 0.00%) if let Some(exp) = block.expr 11,101 ( 0.00%) && matches!( 7,578 ( 0.00%) exp.kind, . ExprKind::If(_, _, _) | ExprKind::Match(_, _, hir::MatchSource::Normal) . ) . { 4,995 ( 0.00%) check_expr(cx, exp); 43,429 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unused_io_amount.rs:clippy_lints::unused_io_amount::check_expr (555x) . } 39,248 ( 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) . } . 27,657 ( 0.00%) fn check_expr<'a>(cx: &LateContext<'a>, expr: &'a hir::Expr<'a>) { 16,280 ( 0.00%) match expr.kind { . ExprKind::If(cond, _, _) 1,441 ( 0.00%) if let ExprKind::Let(hir::LetExpr { pat, init, .. }) = cond.kind 260 ( 0.00%) && is_ok_wild_or_dotdot_pattern(cx, pat) 10,920 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unused_io_amount.rs:clippy_lints::unused_io_amount::is_ok_wild_or_dotdot_pattern (52x) . && 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 1,462 ( 0.00%) ExprKind::Match(expr, [arm1, arm2], hir::MatchSource::Normal) if let Some(op) = should_lint(cx, expr) => { 5,225 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unused_io_amount.rs:clippy_lints::unused_io_amount::should_lint (80x) . 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) => {}, 14,330 ( 0.00%) _ if let Some(op) = should_lint(cx, expr) => { 181,319 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unused_io_amount.rs:clippy_lints::unused_io_amount::should_lint (2,866x) . emit_lint(cx, expr.span, expr.hir_id, op, &[]); . }, . _ => {}, . } 24,584 ( 0.00%) } . 26,514 ( 0.00%) fn should_lint<'a>(cx: &LateContext<'a>, mut inner: &'a hir::Expr<'a>) -> Option { . inner = unpack_match(inner); 2,946 ( 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) 26,514 ( 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 . 260 ( 0.00%) if let PatKind::TupleStruct(ref path, inner_pat, _) = pat.kind . // we check against Result::Ok to avoid linting on Err(_) or something else. 364 ( 0.00%) && cx.qpath_res(path, pat.hir_id).ctor_parent(cx).is_lang_item(cx, hir::LangItem::ResultOk) 1,196 ( 0.00%) => ???:::qpath_res (52x) . { . if matches!(inner_pat, []) { . return true; . } . . if let [cons_pat] = inner_pat . && matches!(cons_pat.kind, PatKind::Wild) . { . return true; . } . return false; . } . false 52 ( 0.00%) } . . // this is partially taken from panic_unimplemented . fn is_unreachable_or_panic(cx: &LateContext<'_>, expr: &hir::Expr<'_>) -> bool { . let expr = peel_blocks(expr); . let Some(macro_call) = root_macro_call_first_node(cx, expr) else { . return false; . }; . 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> { 9,711 ( 0.00%) while let ExprKind::MethodCall(path, receiver, ..) = expr.kind { . if matches!( 821 ( 0.00%) path.ident.name, 8,556 ( 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> { 8,158 ( 0.00%) while let ExprKind::Call(func, [arg_0]) = expr.kind 1,992 ( 0.00%) && let ExprKind::Path(qpath) = func.kind 1,992 ( 0.00%) && cx.tcx.qpath_is_lang_item(qpath, hir::LangItem::TryTraitBranch) 41,448 ( 0.00%) => ???:::qpath_is_lang_item (332x) . { . expr = arg_0; . } . expr . } . . fn unpack_match<'a>(mut expr: &'a hir::Expr<'a>) -> &'a hir::Expr<'a> { 9,834 ( 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> { 4,276 ( 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 { 4,276 ( 0.00%) let ExprKind::MethodCall(path, ..) = call.kind else { . return None; . }; . 2,424 ( 0.00%) let vectorized = match path.ident.as_str() { 25,856 ( 0.00%) => ???:::as_str (808x) 55 ( 0.00%) "write_vectored" | "read_vectored" => true, 262 ( 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 ---------------------------------------- 11,068 ( 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 { 870 ( 0.00%) let TyKind::Path(qpath) = hir_ty.kind else { return None }; 580 ( 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(); . 4,855 ( 0.00%) visitor.visit_body(body); 2,231,064 ( 0.06%) => ???:::visit_body (2,414x) 7,260 ( 0.00%) visitor.returns . } . . fn has_conditional_return(body: &Body<'_>, expr: &Expr<'_>) -> bool { . match get_return_calls_in_body(body).as_slice() { 9,292 ( 0.00%) [] => false, 1,811 ( 0.00%) [return_expr] => return_expr.hir_id != expr.hir_id, . _ => true, . } . } . 3,294 ( 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); 1,464 ( 0.00%) if let Some(( . _, . Node::Item(Item { . kind: ItemKind::Impl(impl_), . owner_id, . .. . }), 366 ( 0.00%) )) = cx.tcx.hir_parent_iter(hir_id).next() . // We exclude `impl` blocks generated from rustc's proc macros. 2,196 ( 0.00%) && !cx.tcx.is_automatically_derived(owner_id.to_def_id()) 43,246 ( 0.00%) => ???:::is_automatically_derived (366x) . // It is a implementation of a trait. 912 ( 0.00%) && let Some(of_trait) = impl_.of_trait . { 111 ( 0.00%) of_trait.trait_ref.trait_def_id() 481 ( 0.00%) => ???:::trait_def_id (37x) . } else { . None . } 3,294 ( 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 174 ---------------------------------------- . } . 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() 42 ( 0.00%) .get(cx.tcx.local_def_id_to_hir_id(method_def_id)) . else { . return; . }; . . // That has two arguments. 126 ( 0.00%) if let [self_arg, other_arg] = sig.inputs() 126 ( 0.00%) && let &ty::Ref(_, self_arg, _) = self_arg.kind() 168 ( 0.00%) && let &ty::Ref(_, other_arg, _) = other_arg.kind() . // The two arguments are of the same type. 168 ( 0.00%) && let Some(trait_def_id) = get_impl_trait_def_id(cx, method_def_id) 16,300 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unconditional_recursion.rs:clippy_lints::unconditional_recursion::get_impl_trait_def_id (42x) . // The trait is `PartialEq`. 12 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::PartialEq, trait_def_id) 206 ( 0.00%) => ???:::is_diagnostic_item (2x) . { 10 ( 0.00%) let to_check_op = if name.name == sym::eq { . BinOpKind::Eq . } else { . BinOpKind::Ne . }; 6 ( 0.00%) let is_bad = match expr.kind { 2 ( 0.00%) 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) . }, . ExprKind::MethodCall(segment, receiver, [arg], _) if segment.ident.name == name.name => { . let receiver_ty = cx.typeck_results().expr_ty_adjusted(receiver); . let arg_ty = cx.typeck_results().expr_ty_adjusted(arg); -- line 210 ---------------------------------------- -- line 266 ---------------------------------------- . }; . if is_bad { . span_error(cx, method_span, expr); . } . } . } . . fn is_default_method_on_current_ty<'tcx>(tcx: TyCtxt<'tcx>, qpath: QPath<'tcx>, implemented_ty_id: DefId) -> bool { 22 ( 0.00%) match qpath { . QPath::Resolved(_, path) => match path.segments { 15 ( 0.00%) [first, .., last] => last.ident.name == kw::Default && first.res.opt_def_id() == Some(implemented_ty_id), . _ => false, . }, . QPath::TypeRelative(ty, segment) => { 6 ( 0.00%) if segment.ident.name != kw::Default { . return false; . } 6 ( 0.00%) if matches!( 1 ( 0.00%) ty.kind, . TyKind::Path(QPath::Resolved( . _, . hir::Path { . res: Res::SelfTyAlias { .. }, . .. . }, . )) . ) { . return true; . } 6 ( 0.00%) get_hir_ty_def_id(tcx, *ty) == Some(implemented_ty_id) . }, . } . } . . struct CheckCalls<'a, 'tcx> { . cx: &'a LateContext<'tcx>, . implemented_ty_id: DefId, . method_span: Span, -- line 303 ---------------------------------------- -- line 309 ---------------------------------------- . { . type NestedFilter = nested_filter::OnlyBodies; . type Result = ControlFlow<()>; . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { . self.cx.tcx . } . 549 ( 0.00%) fn visit_expr(&mut self, expr: &'tcx Expr<'tcx>) -> ControlFlow<()> { 183 ( 0.00%) walk_expr(self, expr)?; 5,265 ( 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:: (7x) . 133 ( 0.00%) if let ExprKind::Call(f, _) = expr.kind 33 ( 0.00%) && let ExprKind::Path(qpath) = f.kind 37 ( 0.00%) && is_default_method_on_current_ty(self.cx.tcx, qpath, self.implemented_ty_id) . && let Some(method_def_id) = f.res(self.cx).opt_def_id() . && let Some(trait_def_id) = self.cx.tcx.trait_of_assoc(method_def_id) . && self.cx.tcx.is_diagnostic_item(sym::Default, trait_def_id) . { . span_error(self.cx, self.method_span, expr); . return ControlFlow::Break(()); . } . ControlFlow::Continue(()) 488 ( 0.00%) } . } . . impl UnconditionalRecursion { 2,312 ( 0.00%) fn init_default_impl_for_type_if_needed(&mut self, cx: &LateContext<'_>) { 289 ( 0.00%) if self.default_impl_for_type.is_empty() 5 ( 0.00%) && let Some(default_trait_id) = cx.tcx.get_diagnostic_item(sym::Default) 106 ( 0.00%) => ???:::get_diagnostic_item (1x) . { . let impls = cx.tcx.trait_impls_of(default_trait_id); . for (ty, impl_def_ids) in impls.non_blanket_impls() { 754 ( 0.00%) let Some(self_def_id) = ty.def() else { continue }; 728 ( 0.00%) for &impl_def_id in impl_def_ids { 2,184 ( 0.00%) if !cx.tcx.is_automatically_derived(impl_def_id) && 1,393,807 ( 0.04%) => ???:::is_automatically_derived (364x) . 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| { 1,103 ( 0.00%) item.is_fn() && item.def_id.is_local() && item.name() == kw::Default 54 ( 0.00%) => ???:::name (9x) . }) 81 ( 0.00%) && let Some(body_node) = cx.tcx.hir_get_if_local(assoc_item.def_id) 1,335 ( 0.00%) => ???:::hir_get_if_local (9x) 36 ( 0.00%) && let Some(body_id) = body_node.body_id() 198 ( 0.00%) => ???:::body_id (9x) 27 ( 0.00%) && let body = cx.tcx.hir_body(body_id) 565 ( 0.00%) => ???:::hir_body (9x) . // We don't want to keep it if it has conditional return. 18 ( 0.00%) && let [return_expr] = get_return_calls_in_body(body).as_slice() 34 ( 0.00%) && let ExprKind::Call(call_expr, _) = return_expr.kind . // We need to use typeck here to infer the actual function being called. 35 ( 0.00%) && let body_def_id = cx.tcx.hir_enclosing_body_owner(call_expr.hir_id) 2,667 ( 0.00%) => ???:::hir_enclosing_body_owner (7x) 35 ( 0.00%) && let Some(body_owner) = cx.tcx.hir_maybe_body_owned_by(body_def_id) 1,155 ( 0.00%) => ???:::hir_maybe_body_owned_by (7x) 14 ( 0.00%) && let typeck = cx.tcx.typeck_body(body_owner.id()) 1,449 ( 0.00%) => ???:::typeck_body (7x) 42 ( 0.00%) && let Some(call_def_id) = typeck.type_dependent_def_id(call_expr.hir_id) 357 ( 0.00%) => ???:::type_dependent_def_id (7x) . { . self.default_impl_for_type.insert(self_def_id, call_def_id); . } . } . } . } 2,312 ( 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. 3,970 ( 0.00%) if decl.implicit_self().has_implicit_self() { 15,880 ( 0.00%) => ???:::implicit_self (1,985x) . return; . } . // We don't check trait implementations. 1,620 ( 0.00%) if get_impl_trait_def_id(cx, method_def_id).is_some() { 114,718 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unconditional_recursion.rs:clippy_lints::unconditional_recursion::get_impl_trait_def_id (324x) . return; . } . . let hir_id = cx.tcx.local_def_id_to_hir_id(method_def_id); 1,156 ( 0.00%) if let Some(( . _, . Node::Item(Item { . kind: ItemKind::Impl(impl_), . .. . }), 289 ( 0.00%) )) = cx.tcx.hir_parent_iter(hir_id).next() 2,890 ( 0.00%) && let Some(implemented_ty_id) = get_hir_ty_def_id(cx.tcx, *impl_.self_ty) . && { 867 ( 0.00%) self.init_default_impl_for_type_if_needed(cx); 3,317,826 ( 0.09%) => site/frontend/rust-clippy/clippy_lints/src/unconditional_recursion.rs:::init_default_impl_for_type_if_needed (289x) . true . } 578 ( 0.00%) && let Some(return_def_id) = self.default_impl_for_type.get(&implemented_ty_id) 7 ( 0.00%) && method_def_id.to_def_id() == *return_def_id . { 49 ( 0.00%) let mut c = CheckCalls { . cx, . implemented_ty_id, . method_span, . }; 14 ( 0.00%) let _ = walk_body(&mut c, body); 5,566 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_body:: (7x) . } . } . } . . fn check_from(cx: &LateContext<'_>, method_span: Span, method_def_id: LocalDefId, expr: &Expr<'_>) { . let Some(sig) = cx . .typeck_results() . .liberated_fn_sigs() 11 ( 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 64 ( 0.00%) if let Some((fn_def_id, node_args)) = fn_def_id_with_node_args(cx, expr) 1,039 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id_with_node_args (11x) 19 ( 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 { 22,568 ( 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... 8,056 ( 0.00%) if let FnKind::Method(name, _) = kind 11,982 ( 0.00%) && let expr = expr_or_init(cx, body.value).peel_blocks() 62,764 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::expr_or_init (2,414x) . // Doesn't have a conditional return. 6,647 ( 0.00%) && !has_conditional_return(body, expr) . { . match name.name { 13,811 ( 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); . } 22,568 ( 0.00%) } . } 20,912 ( 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; . 19,299 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, func: &Expr<'tcx>, args: &[Expr<'_>], msrv: Msrv) { 11,020 ( 0.00%) if let ExprKind::Path(QPath::TypeRelative(ty, segment)) = func.kind 2,145 ( 0.00%) && segment.ident.name == sym::new_unchecked . && let [init_arg] = args 224 ( 0.00%) && is_inside_always_const_context(cx.tcx, expr.hir_id) 20,703 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_inside_always_const_context (32x) 15 ( 0.00%) && cx.typeck_results().node_type(ty.hir_id).is_diag_item(cx, sym::NonZero) 123 ( 0.00%) => ???:::node_type (3x) . && 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"); . let sugg = format!( . "{ty_str}::new({}).unwrap()", . snippet_with_applicability(cx, init_arg.span, "_", &mut app) -- line 26 ---------------------------------------- -- 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"); . }); . } . } 22,056 ( 0.00%) } 1,811 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs -------------------------------------------------------------------------------- Ir -- line 67 ---------------------------------------- . . #[derive(Default)] . pub struct SuspiciousOperationGroupings { . // Spans already linted. . linted_spans: FxHashSet, . } . . impl EarlyLintPass for SuspiciousOperationGroupings { 445,032 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 98,896 ( 0.00%) if expr.span.from_expansion() { . return; . } . 120,308 ( 0.00%) if let Some(binops) = extract_related_binops(&expr.kind) { 453 ( 0.00%) check_binops(cx, &binops.iter().collect::>(), &mut self.linted_spans); 77,877 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::check_binops (151x) . . let mut op_types = Vec::with_capacity(binops.len()); . // We could use a hashmap, etc. to avoid being O(n*m) here, but . // we want the lints to be emitted in a consistent order. Besides, . // m, (the number of distinct `BinOpKind`s in `binops`) . // will often be small, and does have an upper limit. . binops.iter().map(|b| b.op).for_each(|op| { . if !op_types.contains(&op) { . op_types.push(op); . } . }); . 698 ( 0.00%) for op_type in op_types { . let ops: Vec<_> = binops.iter().filter(|b| b.op == op_type).collect(); . 735 ( 0.00%) check_binops(cx, &ops, &mut self.linted_spans); 26,705 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::check_binops (245x) . } . } 395,584 ( 0.01%) } . } . 3,564 ( 0.00%) fn check_binops(cx: &EarlyContext<'_>, binops: &[&BinaryOp<'_>], linted_spans: &mut FxHashSet) { . let binop_count = binops.len(); 792 ( 0.00%) if binop_count < 2 { . // Single binary operation expressions would likely be false . // positives. . return; . } . . let mut one_ident_difference_count = 0; . let mut no_difference_info = None; . let mut double_difference_info = None; . let mut expected_ident_loc = None; . . let mut paired_identifiers = FxHashSet::default(); . 277 ( 0.00%) for (i, BinaryOp { left, right, op, .. }) in binops.iter().enumerate() { 1,152 ( 0.00%) match ident_difference_expr(left, right) { . IdentDifference::NoDifference => { 4 ( 0.00%) if is_useless_with_eq_exprs(*op) { . // The `eq_op` lint should catch this in this case. . return; . } . . no_difference_info = Some(i); . }, . IdentDifference::Single(ident_loc) => { . one_ident_difference_count += 1; 180 ( 0.00%) if let Some(previous_expected) = expected_ident_loc { 44 ( 0.00%) if previous_expected != ident_loc { . // This expression doesn't match the form we're . // looking for. . return; . } . } else { . expected_ident_loc = Some(ident_loc); . } . . // If there was only a single difference, all other idents . // must have been the same, and thus were paired. 600 ( 0.00%) for id in skip_index(IdentIter::from(*left), ident_loc.index) { 13,542 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ast_utils/ident_iter.rs:>::from (90x) . paired_identifiers.insert(id); . } 90 ( 0.00%) }, . IdentDifference::Double(ident_loc1, ident_loc2) => { . double_difference_info = Some((i, ident_loc1, ident_loc2)); . }, . IdentDifference::Multiple | IdentDifference::NonIdent => { . // It's too hard to know whether this is a bug or not. . return; . }, . } . } . 50 ( 0.00%) let mut applicability = Applicability::MachineApplicable; . 150 ( 0.00%) if let Some(expected_loc) = expected_ident_loc { 264 ( 0.00%) match (no_difference_info, double_difference_info) { . (Some(i), None) => attempt_to_emit_no_difference_lint(cx, binops, i, expected_loc, linted_spans), . (None, Some((double_difference_index, ident_loc1, ident_loc2))) => { . if one_ident_difference_count == binop_count - 1 . && let Some(binop) = binops.get(double_difference_index) . { . let changed_loc = if ident_loc1 == expected_loc { . ident_loc2 . } else if ident_loc2 == expected_loc { -- line 167 ---------------------------------------- -- line 176 ---------------------------------------- . { . emit_suggestion(cx, binop.span, sugg, applicability, linted_spans); . } . } . }, . _ => {}, . } . } 3,168 ( 0.00%) } . . fn attempt_to_emit_no_difference_lint( . cx: &EarlyContext<'_>, . binops: &[&BinaryOp<'_>], . i: usize, . expected_loc: IdentLocation, . linted_spans: &mut FxHashSet, . ) { -- line 192 ---------------------------------------- -- line 346 ---------------------------------------- . fn new(op: BinOpKind, span: Span, (left, right): (&'exprs Expr, &'exprs Expr)) -> Self { . Self { op, span, left, right } . } . } . . fn strip_non_ident_wrappers(expr: &Expr) -> &Expr { . let mut output = expr; . loop { 2,852 ( 0.00%) output = match &output.kind { 24 ( 0.00%) ExprKind::Paren(inner) | ExprKind::Unary(_, inner) => inner, . _ => { . return output; . }, . }; . } . } . . fn extract_related_binops(kind: &ExprKind) -> Option>> { 120,006 ( 0.00%) append_opt_vecs(chained_binops(kind), if_statement_binops(kind)) 1,067,634 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::if_statement_binops (40,002x) 880,461 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::append_opt_vecs:: (40,002x) . } . 286,370 ( 0.01%) fn if_statement_binops(kind: &ExprKind) -> Option>> { 284,590 ( 0.01%) match kind { 2,494 ( 0.00%) ExprKind::If(condition, _, _) => chained_binops(&condition.kind), 184 ( 0.00%) ExprKind::Paren(e) => if_statement_binops(&e.kind), . ExprKind::Block(block, _) => { 708 ( 0.00%) let mut output = None; 708 ( 0.00%) for stmt in &block.stmts { 4,704 ( 0.00%) match &stmt.kind { . StmtKind::Expr(e) | StmtKind::Semi(e) => { 12,712 ( 0.00%) output = append_opt_vecs(output, if_statement_binops(&e.kind)); 26,683 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::if_statement_binops'2 (876x) 19,272 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::append_opt_vecs:: (876x) . }, . _ => {}, . } . } 4,956 ( 0.00%) output . }, . _ => None, . } 323,712 ( 0.01%) } . 286,370 ( 0.01%) fn append_opt_vecs(target_opt: Option>, source_opt: Option>) -> Option> { 204,550 ( 0.01%) match (target_opt, source_opt) { . (Some(mut target), Some(source)) => { . target.reserve(source.len()); . for op in source { . target.push(op); . } . Some(target) . }, 604 ( 0.00%) (Some(v), None) | (None, Some(v)) => Some(v), 81,518 ( 0.00%) (None, None) => None, . } 327,280 ( 0.01%) } . . fn chained_binops(kind: &ExprKind) -> Option>> { 291,430 ( 0.01%) match kind { 14,878 ( 0.00%) ExprKind::Binary(_, left_outer, right_outer) => chained_binops_helper(left_outer, right_outer), 20,627 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::chained_binops_helper (401x) 956 ( 0.00%) ExprKind::Paren(e) | ExprKind::Unary(_, e) => chained_binops(&e.kind), 38,340 ( 0.00%) _ => None, . } . } . 24,880 ( 0.00%) fn chained_binops_helper<'expr>(left_outer: &'expr Expr, right_outer: &'expr Expr) -> Option>> { 19,254 ( 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), 45 ( 0.00%) ) => chained_binops_helper(left_e, right_e), . (ExprKind::Paren(left_e) | ExprKind::Unary(_, left_e), _) => chained_binops_helper(left_e, right_outer), 141 ( 0.00%) (_, ExprKind::Paren(right_e) | ExprKind::Unary(_, right_e)) => chained_binops_helper(left_outer, right_e), . ( . ExprKind::Binary(Spanned { node: left_op, .. }, left_left, left_right), . ExprKind::Binary(Spanned { node: right_op, .. }, right_left, right_right), 1,520 ( 0.00%) ) => match ( 1,330 ( 0.00%) chained_binops_helper(left_left, left_right), 10,999 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::chained_binops_helper'2 (151x) 1,140 ( 0.00%) chained_binops_helper(right_left, right_right), 6,529 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/suspicious_operation_groupings.rs:clippy_lints::suspicious_operation_groupings::chained_binops_helper'2 (151x) . ) { . (Some(mut left_ops), Some(right_ops)) => { . left_ops.reserve(right_ops.len()); . for op in right_ops { . left_ops.push(op); . } . Some(left_ops) . }, 93 ( 0.00%) (Some(mut left_ops), _) => { 62 ( 0.00%) left_ops.push(BinaryOp::new(*right_op, right_outer.span, (right_left, right_right))); 155 ( 0.00%) Some(left_ops) . }, 32 ( 0.00%) (_, Some(mut right_ops)) => { 24 ( 0.00%) right_ops.insert(0, BinaryOp::new(*left_op, left_outer.span, (left_left, left_right))); 24 ( 0.00%) Some(right_ops) . }, 1,661 ( 0.00%) (None, None) => Some(vec![ 302 ( 0.00%) BinaryOp::new(*left_op, left_outer.span, (left_left, left_right)), 302 ( 0.00%) BinaryOp::new(*right_op, right_outer.span, (right_left, right_right)), . ]), 190 ( 0.00%) }, 2,298 ( 0.00%) _ => None, . } 19,904 ( 0.00%) } . 44 ( 0.00%) #[derive(Clone, Copy, PartialEq, Eq, Default, Debug)] . struct IdentLocation { . index: usize, . } . . impl Add for IdentLocation { . type Output = IdentLocation; . . fn add(self, other: Self) -> Self::Output { . Self { 12 ( 0.00%) index: self.index + other.index, . } . } . } . . impl AddAssign for IdentLocation { . fn add_assign(&mut self, other: Self) { . *self = *self + other; . } -- line 466 ---------------------------------------- -- line 474 ---------------------------------------- . Multiple, . NonIdent, . } . . impl Add for IdentDifference { . type Output = IdentDifference; . . fn add(self, other: Self) -> Self::Output { 238 ( 0.00%) match (self, other) { . (Self::NoDifference, output) | (output, Self::NoDifference) => output, . (Self::Multiple, _) . | (_, Self::Multiple) . | (Self::Double(_, _), Self::Single(_)) . | (Self::Single(_) | Self::Double(_, _), Self::Double(_, _)) => Self::Multiple, . (Self::NonIdent, _) | (_, Self::NonIdent) => Self::NonIdent, . (Self::Single(il1), Self::Single(il2)) => Self::Double(il1, il2), . } -- line 490 ---------------------------------------- -- line 537 ---------------------------------------- . // . // If it turns out that problematic cases are more prevalent than we assume, . // then we should be able to change this function to do the correct traversal, . // without needing to change the rest of the code. . . #[allow(clippy::enum_glob_use)] . use ExprKind::*; . 2,663 ( 0.00%) match ( . &strip_non_ident_wrappers(left).kind, . &strip_non_ident_wrappers(right).kind, . ) { . (Yield(_), Yield(_)) . | (Try(_), Try(_)) . | (Paren(_), Paren(_)) . | (Repeat(_, _), Repeat(_, _)) . | (Struct(_), Struct(_)) -- line 553 ---------------------------------------- -- line 617 ---------------------------------------- . ) -> (IdentDifference, IdentLocation) { . // See the note in `ident_difference_expr_with_base_location` about `IdentIter` . let mut difference = IdentDifference::NoDifference; . . let mut left_iterator = left.into(); . let mut right_iterator = right.into(); . . loop { 2,096 ( 0.00%) match (left_iterator.next(), right_iterator.next()) { 4,384 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ast_utils/ident_iter.rs:::next (494x) . (Some(left_ident), Some(right_ident)) => { 142 ( 0.00%) if !eq_id(left_ident, right_ident) { . difference += IdentDifference::Single(base); . if difference.is_complete() { . return (difference, base); . } . } . }, . (Some(_), None) | (None, Some(_)) => { . return (IdentDifference::NonIdent, base); -- line 635 ---------------------------------------- -- line 667 ---------------------------------------- . }) . } . . fn skip_index(iter: Iter, index: usize) -> impl Iterator . where . Iter: Iterator, . { . iter.enumerate() 440 ( 0.00%) .filter_map(move |(i, a)| if i == index { None } else { Some(a) }) . } 262,551 ( 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 248,607 ( 0.01%) if let Some(args) = VecArgs::hir(cx, expr) 1,942,248 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (62,146x) 168 ( 0.00%) && let VecArgs::Repeat(inner_expr, len) = args 46 ( 0.00%) && 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). 124,303 ( 0.00%) else if let ExprKind::Repeat(inner_expr, const_arg) = expr.kind 31 ( 0.00%) && let ConstArgKind::Anon(anon_const) = const_arg.kind 45 ( 0.00%) && let length_expr = cx.tcx.hir_body(anon_const.body).value 702 ( 0.00%) => ???:::hir_body (9x) 18 ( 0.00%) && !length_expr.span.from_expansion() 18 ( 0.00%) && let ExprKind::Lit(literal) = length_expr.kind 32 ( 0.00%) && let LitKind::Int(Pu128(0), _) = literal.node . { . inner_check(cx, expr, inner_expr, false); . } 310,730 ( 0.01%) } . } . . fn inner_check(cx: &LateContext<'_>, expr: &'_ Expr<'_>, inner_expr: &'_ Expr<'_>, is_vec: bool) { . // check if expr is a call or has a call inside it . if inner_expr.can_have_side_effects() { . let parent_hir_node = cx.tcx.parent_hir_node(expr.hir_id); . let inner_expr_ty = cx.typeck_results().expr_ty(inner_expr); . let return_type = cx.typeck_results().expr_ty(expr); -- line 78 ---------------------------------------- 17 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/wrong_self_convention.rs -------------------------------------------------------------------------------- Ir -- line 34 ---------------------------------------- . NotEndsWith(&'static str), . IsSelfTypeCopy(bool), . ImplementsTrait(bool), . IsTraitItem(bool), . } . . impl Convention { . #[must_use] 50,407 ( 0.00%) fn check<'tcx>( . &self, . cx: &LateContext<'tcx>, . self_ty: Ty<'tcx>, . other: &str, . implements_trait: bool, . is_trait_item: bool, . ) -> bool { 36,005 ( 0.00%) match *self { 121 ( 0.00%) Self::Eq(this) => this == other, 10,647 ( 0.00%) Self::StartsWith(this) => other.starts_with(this) && this != other, 6,976 ( 0.00%) Self::EndsWith(this) => other.ends_with(this) && this != other, 240 ( 0.00%) Self::NotEndsWith(this) => !Self::EndsWith(this).check(cx, self_ty, other, implements_trait, is_trait_item), 1,692 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/wrong_self_convention.rs:::check'2 (30x) 180 ( 0.00%) Self::IsSelfTypeCopy(is_true) => is_true == is_copy(cx, self_ty), 90,888 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_copy (30x) 126 ( 0.00%) Self::ImplementsTrait(is_true) => is_true == implements_trait, 69 ( 0.00%) Self::IsTraitItem(is_true) => is_true == is_trait_item, . } 43,206 ( 0.00%) } . } . . impl fmt::Display for Convention { 20 ( 0.00%) fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { 100 ( 0.00%) match *self { . Self::Eq(this) => write!(f, "`{this}`"), 75 ( 0.00%) Self::StartsWith(this) => write!(f, "`{this}*`"), . Self::EndsWith(this) => write!(f, "`*{this}`"), . Self::NotEndsWith(this) => write!(f, "`~{this}`"), 5 ( 0.00%) Self::IsSelfTypeCopy(is_true) => { 55 ( 0.00%) write!(f, "`self` type is{} `Copy`", if is_true { "" } else { " not" }) . }, . Self::ImplementsTrait(is_true) => { . let (negation, s_suffix) = if is_true { ("", "s") } else { (" does not", "") }; . write!(f, "method{negation} implement{s_suffix} a trait") . }, . Self::IsTraitItem(is_true) => { . let suffix = if is_true { " is" } else { " is not" }; . write!(f, "method{suffix} a trait item") . }, . } 40 ( 0.00%) } . } . 10,959 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . item_name: Symbol, . self_ty: Ty<'tcx>, . first_arg_ty: Ty<'tcx>, . first_arg_span: Span, . implements_trait: bool, . is_trait_item: bool, . ) { . let item_name_str = item_name.as_str(); . if let Some((conventions, self_kinds)) = &CONVENTIONS.iter().find(|(convs, _)| { . convs . .iter() 59,054 ( 0.00%) .all(|conv| conv.check(cx, self_ty, item_name_str, implements_trait, is_trait_item)) 424,690 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/methods/wrong_self_convention.rs:::check (7,171x) . }) { . // don't lint if it implements a trait but not willing to check `Copy` types conventions (see #7032) 252 ( 0.00%) if implements_trait 28 ( 0.00%) && !conventions . .iter() 28 ( 0.00%) .any(|conv| matches!(conv, Convention::IsSelfTypeCopy(_))) . { . return; . } 883 ( 0.00%) if !self_kinds.iter().any(|k| k.matches(cx, self_ty, first_arg_ty)) { 410,376 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/lib.rs:::matches (157x) . let suggestion = { 45 ( 0.00%) if conventions.len() > 1 { . // Don't mention `NotEndsWith` when there is also `StartsWith` convention present 10 ( 0.00%) let cut_ends_with_conv = conventions.iter().any(|conv| matches!(conv, Convention::StartsWith(_))) . && conventions . .iter() 10 ( 0.00%) .any(|conv| matches!(conv, Convention::NotEndsWith(_))); . . let s = conventions . .iter() 155 ( 0.00%) .filter(|conv| !(cut_ends_with_conv && matches!(conv, Convention::NotEndsWith(_)))) . .filter(|conv| !matches!(conv, Convention::ImplementsTrait(_) | Convention::IsTraitItem(_))) . .format(" and "); . 15 ( 0.00%) format!("methods with the following characteristics: ({s})") . } else { 70 ( 0.00%) format!("methods called {}", conventions[0]) . } . }; . . span_lint_and_help( . cx, . WRONG_SELF_CONVENTION, . first_arg_span, 105 ( 0.00%) format!( . "{suggestion} usually take {}", 15 ( 0.00%) self_kinds.iter().map(|k| k.description()).format(" or ") . ), 15 ( 0.00%) None, . "consider choosing a less ambiguous name", . ); . } . } 6,744 ( 0.00%) } 276 ( 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 { 248,643 ( 0.01%) Filter { iter, predicate } . } . } . . impl Filter . where . I: Iterator, . P: FnMut(&I::Item) -> bool, . { -- line 36 ---------------------------------------- -- line 71 ---------------------------------------- . f.debug_struct("Filter").field("iter", &self.iter).finish() . } . } . . fn filter_fold( . mut predicate: impl FnMut(&T) -> bool, . mut fold: impl FnMut(Acc, T) -> Acc, . ) -> impl FnMut(Acc, T) -> Acc { 559 ( 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 { 229,159 ( 0.01%) 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] 14,326 ( 0.00%) fn next(&mut self) -> Option { 152 ( 0.00%) self.iter.find(&mut self.predicate) 14,288 ( 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 { 1,482 ( 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, . { 252 ( 0.00%) self.iter.try_fold(init, filter_try_fold(&mut self.predicate, fold)) 52,269 ( 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>> (75x) . } . . #[inline] . fn fold(self, init: Acc, fold: Fold) -> Acc . where . Fold: FnMut(Acc, Self::Item) -> Acc, . { 7,939 ( 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 ---------------------------------------- 126,324 ( 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() { 3,670 ( 0.00%) check_op(cx, e, lhs, rhs, true); 80,449 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/cmp_owned.rs:clippy_lints::operators::cmp_owned::check_op (734x) 4,404 ( 0.00%) check_op(cx, e, rhs, lhs, false); 70,505 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/cmp_owned.rs:clippy_lints::operators::cmp_owned::check_op (734x) . } . } . . #[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()]), . }) . } . 13,212 ( 0.00%) fn check_op(cx: &LateContext<'_>, outer: &Expr<'_>, expr: &Expr<'_>, other: &Expr<'_>, left: bool) { 1,468 ( 0.00%) if !outer.span.eq_ctxt(expr.span) { . return; . } . . let typeck = cx.typeck_results(); 7,300 ( 0.00%) let (arg, arg_span) = match expr.kind { 520 ( 0.00%) ExprKind::MethodCall(_, arg, [], _) . if typeck 2,008 ( 0.00%) .type_dependent_def_id(expr.hir_id) 12,877 ( 0.00%) => ???:::type_dependent_def_id (251x) 1,004 ( 0.00%) .and_then(|id| cx.tcx.trait_of_assoc(id)) 55,885 ( 0.00%) => ???:::trait_of_assoc (251x) 12 ( 0.00%) .is_some_and(|id| matches!(cx.tcx.get_diagnostic_name(id), Some(sym::ToString | sym::ToOwned))) => 159 ( 0.00%) => ???:::get_diagnostic_name (3x) . { . (arg, arg.span) . }, 40 ( 0.00%) ExprKind::Call(path, [arg]) 14 ( 0.00%) if path . .res(cx) . .opt_def_id() 42 ( 0.00%) .is_some_and(|did| match cx.tcx.get_diagnostic_name(did) { 501 ( 0.00%) => ???:::get_diagnostic_name (6x) . Some(sym::from_str_method) => true, 15 ( 0.00%) Some(sym::from_fn) => !is_copy(cx, typeck.expr_ty(expr)), 222 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_copy (3x) 120 ( 0.00%) => ???:::expr_ty (3x) . _ => false, . }) => . { . (arg, arg.span) . }, . _ => return, . }; . -- line 67 ---------------------------------------- -- line 126 ---------------------------------------- . } else { . (span, format!("{other_snippet}{cmp_snippet}{expr_snip}")) . } . }; . . diag.span_suggestion(span, "try", hint, applicability); . }, . ); 11,744 ( 0.00%) } 8,831 ( 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 150 ( 0.00%) let (lint, msg) = match complete_infinite_iter(cx, expr) { . Infinite => (INFINITE_ITER, "infinite iteration detected"), . MaybeInfinite => (MAYBE_INFINITE_ITER, "possible infinite iteration detected"), . Finite => { . return; . }, . }; . span_lint(cx, lint, expr.span, msg); 372,876 ( 0.01%) } . } . . #[derive(Copy, Clone, Debug, PartialEq, Eq)] . enum Finiteness { . Infinite, . MaybeInfinite, . Finite, . } . . use self::Finiteness::{Finite, Infinite, MaybeInfinite}; . . impl Finiteness { . #[must_use] . fn and(self, b: Self) -> Self { 1,559 ( 0.00%) match (self, b) { . (Finite, _) | (_, Finite) => Finite, . (MaybeInfinite, _) | (_, MaybeInfinite) => MaybeInfinite, . _ => Infinite, . } . } . . #[must_use] . fn or(self, b: Self) -> Self { -- line 88 ---------------------------------------- -- line 91 ---------------------------------------- . (MaybeInfinite, _) | (_, MaybeInfinite) => MaybeInfinite, . _ => Finite, . } . } . } . . impl From for Finiteness { . fn from(b: bool) -> Self { 29 ( 0.00%) if b { Infinite } else { Finite } . } . } . . /// This tells us what to look for to know if the iterator returned by . /// this method is infinite . #[derive(Copy, Clone)] . enum Heuristic { . /// infinite no matter what -- line 107 ---------------------------------------- -- line 138 ---------------------------------------- . (sym::filter, 1, First, Infinite), . (sym::filter_map, 1, First, Infinite), . (sym::flat_map, 1, First, Infinite), . (sym::unzip, 0, First, Infinite), . (sym::take_while, 1, First, MaybeInfinite), . (sym::scan, 2, First, MaybeInfinite), . ]; . 15,240 ( 0.00%) fn is_infinite(cx: &LateContext<'_>, expr: &Expr<'_>) -> Finiteness { 12,219 ( 0.00%) match expr.kind { 1,220 ( 0.00%) ExprKind::MethodCall(method, receiver, args, _) => { 16 ( 0.00%) for &(name, len, heuristic, cap) in &HEURISTICS { 11,157 ( 0.00%) if method.ident.name == name && args.len() == len { 48 ( 0.00%) return (match heuristic { . Always => Infinite, 15 ( 0.00%) First => is_infinite(cx, receiver), 2,636 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/infinite_iter.rs:clippy_lints::infinite_iter::is_infinite'2 (15x) . Any => is_infinite(cx, receiver).or(is_infinite(cx, &args[0])), 7 ( 0.00%) All => is_infinite(cx, receiver).and(is_infinite(cx, &args[0])), 184 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/infinite_iter.rs:clippy_lints::infinite_iter::is_infinite'2 (2x) . }) . .and(cap); . } . } . if method.ident.name == sym::flat_map . && args.len() == 1 . && let ExprKind::Closure(&Closure { body, .. }) = args[0].kind . { . let body = cx.tcx.hir_body(body); . return is_infinite(cx, body.value); . } . Finite . }, . ExprKind::Block(block, _) => block.expr.as_ref().map_or(Finite, |e| is_infinite(cx, e)), 3 ( 0.00%) ExprKind::AddrOf(BorrowKind::Ref, _, e) => is_infinite(cx, e), 21 ( 0.00%) ExprKind::Call(path, _) => { 63 ( 0.00%) if let ExprKind::Path(ref qpath) = path.kind { 126 ( 0.00%) cx.qpath_res(qpath, path.hir_id) 758 ( 0.00%) => ???:::qpath_res (21x) . .opt_def_id() 27 ( 0.00%) .is_some_and(|id| cx.tcx.is_diagnostic_item(sym::iter_repeat, id)) 808 ( 0.00%) => ???:::is_diagnostic_item (9x) . .into() . } else { . Finite . } . }, 2 ( 0.00%) ExprKind::Struct(..) => higher::Range::hir(cx, expr).is_some_and(|r| r.end.is_none()).into(), 449 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (1x) . _ => Finite, . } 10,668 ( 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 { 307,350 ( 0.01%) match expr.kind { 19,776 ( 0.00%) ExprKind::MethodCall(method, receiver, args, _) => { 6,592 ( 0.00%) let method_str = method.ident.name; . for &(name, len) in &COMPLETING_METHODS { 144,904 ( 0.00%) if method_str == name && args.len() == len { . return is_infinite(cx, receiver); . } . } . for &(name, len) in &POSSIBLY_COMPLETING_METHODS { 46,050 ( 0.00%) if method_str == name && args.len() == len { 28 ( 0.00%) return MaybeInfinite.and(is_infinite(cx, receiver)); 1,713 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/infinite_iter.rs:clippy_lints::infinite_iter::is_infinite (14x) . } . } 13,136 ( 0.00%) if method.ident.name == sym::last && args.is_empty() { 4 ( 0.00%) let not_double_ended = cx . .tcx 4 ( 0.00%) .get_diagnostic_item(sym::DoubleEndedIterator) 212 ( 0.00%) => ???:::get_diagnostic_item (2x) 20 ( 0.00%) .is_some_and(|id| !implements_trait(cx, cx.typeck_results().expr_ty(receiver), id, &[])); 171,592 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (2x) 80 ( 0.00%) => ???:::expr_ty (2x) 4 ( 0.00%) if not_double_ended { . return is_infinite(cx, receiver); . } 6,566 ( 0.00%) } else if method.ident.name == sym::collect { 26 ( 0.00%) let ty = cx.typeck_results().expr_ty(expr); 520 ( 0.00%) => ???:::expr_ty (13x) 52 ( 0.00%) if matches!( . ty.opt_diag_name(cx), . Some( . sym::BinaryHeap . | sym::BTreeMap . | sym::BTreeSet . | sym::HashMap . | sym::HashSet . | sym::LinkedList -- line 246 ---------------------------------------- -- line 247 ---------------------------------------- . | sym::Vec . | sym::VecDeque, . ) . ) { . return is_infinite(cx, receiver); . } . } . }, 1,468 ( 0.00%) ExprKind::Binary(op, l, r) if op.node.is_comparison() => { 4,404 ( 0.00%) return is_infinite(cx, l).and(is_infinite(cx, r)).and(MaybeInfinite); 70,212 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/infinite_iter.rs:clippy_lints::infinite_iter::is_infinite (1,468x) . }, // TODO: ExprKind::Loop + Match . _ => (), . } . Finite . } 68,512 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/literal_representation.rs -------------------------------------------------------------------------------- Ir -- line 161 ---------------------------------------- . LargeDigitGroups, . DecimalRepresentation, . MistypedLiteralSuffix, . UnusualByteGroupings, . } . . impl WarningType { . fn lint_and_text(&self) -> (&'static Lint, &'static str, &'static str) { 70 ( 0.00%) match self { . Self::MistypedLiteralSuffix => ( . MISTYPED_LITERAL_SUFFIXES, . "mistyped literal suffix", . "did you mean to write", . ), . Self::UnreadableLiteral => (UNREADABLE_LITERAL, "long literal lacking separators", "consider"), . Self::LargeDigitGroups => (LARGE_DIGIT_GROUPS, "digit groups should be smaller", "consider"), . Self::InconsistentDigitGrouping => ( -- line 177 ---------------------------------------- -- line 188 ---------------------------------------- . UNUSUAL_BYTE_GROUPINGS, . "digits of hex, binary or octal literal not in groups of equal size", . "consider", . ), . } . } . . fn display(&self, num_lit: &NumericLiteral<'_>, cx: &EarlyContext<'_>, span: Span) { 40 ( 0.00%) let (lint, message, try_msg) = self.lint_and_text(); . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] 100 ( 0.00%) span_lint_and_then(cx, lint, span, message, |diag| { 7,120 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::display::{closure#0}> (10x) . diag.span_suggestion(span, try_msg, num_lit.format(), Applicability::MaybeIncorrect); . }); . } . } . . pub struct LiteralDigitGrouping { . lint_fraction_readability: bool, . } . . impl EarlyLintPass for LiteralDigitGrouping { 346,136 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { . // `NumericLiteral::from_lit_kind` only accepts integer and float literals. 101,682 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind 8,358 ( 0.00%) && matches!(lit.kind, token::LitKind::Integer | token::LitKind::Float) 4,848 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . { . self.check_lit(cx, lit, expr.span); . } 395,584 ( 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) { 8,484 ( 0.00%) if let Some(src) = span.get_text(cx) 9,696 ( 0.00%) && let Ok(lit_kind) = LitKind::from_token_lit(lit) 207,582 ( 0.01%) => ???:::from_token_lit (1,212x) 25,452 ( 0.00%) && let Some(mut num_lit) = NumericLiteral::from_lit_kind(&src, &lit_kind) 179,378 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::from_lit_kind (1,212x) 30,300 ( 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 (1,212x) . { . if !Self::check_for_mistyped_suffix(cx, span, &mut num_lit) { . return; . } . . if Self::is_literal_uuid_formatted(&num_lit) { . return; . } . 3,636 ( 0.00%) let result = (|| { 20 ( 0.00%) let integral_group_size = Self::get_group_size(num_lit.integer.split('_'), num_lit.radix, true)?; 3,606 ( 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 { 1,212 ( 0.00%) if num_lit.suffix.is_some() { . return true; . } . 3,618 ( 0.00%) let (part, mistyped_suffixes, is_float) = if let Some((_, exponent)) = &mut num_lit.exponent { . (exponent, &["32", "64"][..], true) 1,206 ( 0.00%) } else if num_lit.fraction.is_some() { . return true; . } else { . (&mut num_lit.integer, &["8", "16", "32", "64"][..], false) . }; . 2,412 ( 0.00%) let mut split = part.rsplit('_'); 2,412 ( 0.00%) let last_group = split.next().expect("At least one group"); 1,286 ( 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 { 40 ( 0.00%) if num_lit.radix != Radix::Hexadecimal { . return false; . } . . // UUIDs should not have a fraction . if num_lit.fraction.is_some() { . return false; . } . 40 ( 0.00%) let group_sizes: Vec = num_lit.integer.split('_').map(str::len).collect(); 40 ( 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"); . 2,424 ( 0.00%) if (radix == Radix::Binary || radix == Radix::Octal || radix == Radix::Hexadecimal) . && let Some(second_size) = groups.next() 93 ( 0.00%) && (!groups.all(|i| i == second_size) || first > second_size) . { . return Err(WarningType::UnusualByteGroupings); . } . . if let Some(second) = groups.next() { 1 ( 0.00%) if !groups.all(|x| x == second) || first > second { . Err(WarningType::InconsistentDigitGrouping) 2 ( 0.00%) } else if second > 4 { . Err(WarningType::LargeDigitGroups) . } else { . Ok(Some(second)) . } 2,422 ( 0.00%) } else if first > 5 && lint_unreadable { . Err(WarningType::UnreadableLiteral) . } else { . Ok(None) . } . } . } . . pub struct DecimalLiteralRepresentation { . threshold: u64, . } . . impl EarlyLintPass for DecimalLiteralRepresentation { 346,136 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { . // Only integer tokens can produce `LitKind::Int`. 98,896 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind . && lit.kind == token::LitKind::Integer 3,636 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . { 6,060 ( 0.00%) self.check_lit(cx, lit, expr.span); . } 395,584 ( 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. 8,484 ( 0.00%) if let Ok(lit_kind) = LitKind::from_token_lit(lit) 207,582 ( 0.01%) => ???:::from_token_lit (1,212x) 4,848 ( 0.00%) && let LitKind::Int(val, _) = lit_kind 1,212 ( 0.00%) && val >= u128::from(self.threshold) 180 ( 0.00%) && let Some(src) = span.get_text(cx) 7,866 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:::get_text::<&rustc_lint::context::EarlyContext> (18x) 108 ( 0.00%) && let Some(num_lit) = NumericLiteral::from_lit_kind(&src, &lit_kind) 2,790 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::from_lit_kind (18x) 450 ( 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 (18x) . && num_lit.radix == Radix::Decimal . { 12 ( 0.00%) let hex = format!("{val:#X}"); 20 ( 0.00%) let num_lit = NumericLiteral::new(&hex, num_lit.suffix, false); 284 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::new (4x) 8 ( 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> { 8 ( 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); . } 8 ( 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 28 ( 0.00%) if ((f.eq("1") || f.eq("2") || f.eq("4") || f.eq("8")) && m.chars().all(|c| c == '0')) 6 ( 0.00%) || ((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 8 ( 0.00%) || ((f.eq("7") || f.eq("F")) && s.chars().all(|c| c == '0' || c == 'F')) . { . return Err(WarningType::DecimalRepresentation); . } . } . . Ok(()) . } . } -- line 500 ---------------------------------------- 18,365 ( 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) { 1,804 ( 0.00%) if self.automatically_derived_at.is_none() . && item . .attrs() . .iter() . .any(|attr| attr.has_name(sym::automatically_derived)) . { 1,206 ( 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); . } . 20,153 ( 0.00%) fn check_fn(&mut self, cx: &EarlyContext<'_>, kind: FnKind<'_>, _: Span, _: NodeId) { 5,758 ( 0.00%) let FnKind::Fn(ctxt, _vis, f) = kind else { . return; . }; . . // Skip foreign functions (extern "C" etc.) 10,400 ( 0.00%) if !matches!(ctxt, FnCtxt::Free | FnCtxt::Assoc(..)) { . return; . } . . // Skip automatically derived functions . if self.automatically_derived_at.is_some() { . return; . } . 8,420 ( 0.00%) if f.sig.span.in_external_macro(cx.sess().source_map()) { . return; . } . . lint_fn(cx, f); 23,032 ( 0.00%) } . } . . fn lint_fn(cx: &EarlyContext<'_>, f: &Fn) { . let generics = &f.generics; . let offenders: Vec<&GenericParam> = generics . .params . .iter() . .filter(|param| { 422 ( 0.00%) !param.bounds.is_empty() && matches!(param.kind, GenericParamKind::Lifetime | GenericParamKind::Type { .. }) . }) . .collect(); 2,104 ( 0.00%) if offenders.is_empty() { . return; . } . . let predicates = offenders . .iter() 336 ( 0.00%) .map(|param| build_predicate_text(cx, param)) 209,476 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/inline_trait_bounds.rs:clippy_lints::inline_trait_bounds::build_predicate_text (112x) . .collect::>(); . . let mut edits = Vec::new(); . 112 ( 0.00%) for param in offenders { 336 ( 0.00%) if let Some(colon) = param.colon_span { 112 ( 0.00%) let remove_span = colon.to(param.bounds.last().unwrap().span()); 10,416 ( 0.00%) => ???:::to (112x) . . edits.push((remove_span, String::new())); . } . } . . let predicate_text = predicates.join(", "); . . let where_clause = &generics.where_clause; 336 ( 0.00%) if where_clause.has_where_token { . let (insert_at, suffix) = if let Some(last_pred) = where_clause.predicates.last() { . // existing `where` with predicates: append after last predicate . (last_pred.span.shrink_to_hi(), format!(", {predicate_text}")) . } else { . // `where` token present but empty predicate list . (where_clause.span.shrink_to_hi(), format!(" {predicate_text}")) . }; . . edits.push((insert_at, suffix)); . } else { 336 ( 0.00%) let insert_at = match &f.sig.decl.output { 9 ( 0.00%) FnRetTy::Default(span) => span.shrink_to_lo(), 618 ( 0.00%) FnRetTy::Ty(ty) => ty.span.shrink_to_hi(), . }; 784 ( 0.00%) edits.push((insert_at, format!(" where {predicate_text}"))); . } . 896 ( 0.00%) span_lint_and_then( 96,100 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (112x) . cx, . INLINE_TRAIT_BOUNDS, 112 ( 0.00%) generics.span, . "inline trait bounds used", 448 ( 0.00%) |diag| { . diag.multipart_suggestion( . "move bounds to a `where` clause", . edits, . Applicability::MachineApplicable, . ); . }, . ); 224 ( 0.00%) } 4,256 ( 0.00%) => ???:__rustc::__rdl_dealloc (112x) . 560 ( 0.00%) fn build_predicate_text(cx: &EarlyContext<'_>, param: &GenericParam) -> String { . // bounds is guaranteed non-empty by the filter in `lint_fn` . let first = param.bounds.first().unwrap(); . let last = param.bounds.last().unwrap(); . 224 ( 0.00%) let bounds_span = first.span().to(last.span()); 10,416 ( 0.00%) => ???:::to (112x) . 112 ( 0.00%) let lhs = snippet(cx, param.ident.span, ".."); . . let rhs = snippet(cx, bounds_span, ".."); . 672 ( 0.00%) format!("{lhs}: {rhs}") 784 ( 0.00%) } 2,589 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_rotate.rs -------------------------------------------------------------------------------- Ir -- line 36 ---------------------------------------- . #[clippy::version = "1.81.0"] . pub MANUAL_ROTATE, . style, . "using bit shifts to rotate integers" . } . . declare_lint_pass!(ManualRotate => [MANUAL_ROTATE]); . 1 ( 0.00%) #[derive(Clone, Copy, Debug, PartialEq, Eq)] . enum ShiftDirection { . Left, . Right, . } . . impl Display for ShiftDirection { . fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { . 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>)> { 1,018 ( 0.00%) if let ExprKind::Binary(op, l, r) = expr.kind { 319 ( 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 { 435,022 ( 0.01%) fn check_expr<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 129,650 ( 0.00%) if let ExprKind::Binary(op, l, r) = expr.kind 5,030 ( 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) 1 ( 0.00%) && 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(), . _ => return, . } . { -- line 85 ---------------------------------------- -- line 130 ---------------------------------------- . expr.span, . "this expression can be rewritten as", . format!("{expr_sugg}.{shift_function}({amount})"), . applicability, . ); . }, . ); . } 497,168 ( 0.01%) } . } 7 ( 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/bool.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . /// // `a` is incremented twice because the value passed to `then_some` is . /// // evaluated eagerly. . /// assert_eq!(a, 2); . /// ``` . #[stable(feature = "bool_to_option", since = "1.62.0")] . #[rustc_const_unstable(feature = "const_bool", issue = "151531")] . #[inline] . pub const fn then_some(self, t: T) -> Option { 9,096 ( 0.00%) if self { Some(t) } else { None } . } . . /// Returns `Some(f())` if the `bool` is [`true`](../std/keyword.true.html), . /// or `None` otherwise. . /// . /// # Examples . /// . /// ``` -- line 45 ---------------------------------------- -- line 58 ---------------------------------------- . /// assert_eq!(a, 1); . /// ``` . #[doc(alias = "then_with")] . #[stable(feature = "lazy_bool_to_option", since = "1.50.0")] . #[rustc_diagnostic_item = "bool_then"] . #[rustc_const_unstable(feature = "const_bool", issue = "151531")] . #[inline] . pub const fn then T + [const] Destruct>(self, f: F) -> Option { 30,226 ( 0.00%) if self { Some(f()) } else { None } . } . . /// Returns `Ok(())` if the `bool` is [`true`](../std/keyword.true.html), . /// or `Err(err)` otherwise. . /// . /// Arguments passed to `ok_or` are eagerly evaluated; if you are . /// passing the result of a function call, it is recommended to use . /// [`ok_or_else`], which is lazily evaluated. -- line 74 ---------------------------------------- 18,632 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unsafe_removed_from_name.rs -------------------------------------------------------------------------------- Ir -- line 26 ---------------------------------------- . style, . "`unsafe` removed from API names on import" . } . . declare_lint_pass!(UnsafeNameRemoval => [UNSAFE_REMOVED_FROM_NAME]); . . impl EarlyLintPass for UnsafeNameRemoval { . fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 1,488 ( 0.00%) if let ItemKind::Use(ref use_tree) = item.kind { 552 ( 0.00%) check_use_tree(use_tree, cx, item.span); 30,900 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unsafe_removed_from_name.rs:clippy_lints::unsafe_removed_from_name::check_use_tree (184x) . } . } . } . 8,568 ( 0.00%) fn check_use_tree(use_tree: &UseTree, cx: &EarlyContext<'_>, span: Span) { 5,445 ( 0.00%) match use_tree.kind { 15 ( 0.00%) UseTreeKind::Simple(Some(new_name)) => { 4 ( 0.00%) if new_name.as_str() == "_" { 64 ( 0.00%) => ???:::as_str (2x) . return; . } 3 ( 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, .. } => { 774 ( 0.00%) for (use_tree, _) in items { 2,304 ( 0.00%) check_use_tree(use_tree, cx, span); 22,587 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/unsafe_removed_from_name.rs:clippy_lints::unsafe_removed_from_name::check_use_tree'2 (291x) . } . }, . } 7,616 ( 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(); 6 ( 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 { 6 ( 0.00%) name.contains("Unsafe") || name.contains("unsafe") . } 1,216 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/explicit_write.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . . impl ExplicitWrite { . pub fn new(format_args: FormatArgsStorage) -> Self { . Self { format_args } . } . } . . impl<'tcx> LateLintPass<'tcx> for ExplicitWrite { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // match call to unwrap 141,222 ( 0.00%) if let ExprKind::MethodCall(unwrap_fun, write_call, [], _) = expr.kind 3,746 ( 0.00%) && unwrap_fun.ident.name == sym::unwrap . // match call to write_fmt 1,200 ( 0.00%) && let ExprKind::MethodCall(write_fun, write_recv, [write_arg], _) = *look_in_block(cx, &write_call.kind) 132 ( 0.00%) && let ExprKind::Call(write_recv_path, []) = write_recv.kind 2 ( 0.00%) && 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) { . Some(sym::io_stdout) => ("stdout", ""), . Some(sym::io_stderr) => ("stderr", "e"), . _ => return, . }; -- line 70 ---------------------------------------- -- line 105 ---------------------------------------- . EXPLICIT_WRITE, . expr.span, . format!("use of `{used}.unwrap()`"), . "try", . format!("{prefix}{sugg_mac}!({inputs_snippet})"), . applicability, . ); . } 497,168 ( 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> { 636 ( 0.00%) if let ExprKind::Block(block, _label @ None) = kind . && let Block { . stmts: [Stmt { kind: StmtKind::Let(local), .. }], . expr: Some(expr_end_of_block), . rules: BlockCheckMode::DefaultBlock, . .. . } = block . . // Find id of the local that expr_end_of_block resolves to -- line 127 ---------------------------------------- 214 ( 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 { 5,960 ( 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 603 ---------------------------------------- . _ => None, . }, . } . } . } . . impl MetaItemInner { . pub fn span(&self) -> Span { 6 ( 0.00%) match self { . MetaItemInner::MetaItem(item) => item.span, . MetaItemInner::Lit(lit) => lit.span, . } . } . . /// For a single-segment meta item, returns its identifier; otherwise, returns `None`. . pub fn ident(&self) -> Option { . self.meta_item().and_then(|meta_item| meta_item.ident()) -- line 619 ---------------------------------------- -- 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> { 1,976 ( 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 { 359,605 ( 0.01%) self.name().map(|x| x == name).unwrap_or(false) 118,968 ( 0.00%) => ???:::name (27,862x) . } . . /// 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]> { 33,970 ( 0.00%) self.symbol_path().unwrap_or(smallvec![sym::doc]) 691,463 ( 0.02%) => ???:::symbol_path (28,850x) . } . . 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 ---------------------------------------- 2 ( 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<'_>) { 7,916 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), . self_ty, . items: [impl_item_ref], . .. 2,180 ( 0.00%) }) = item.kind 1,845 ( 0.00%) && let Some(into_trait_seg) = of_trait.trait_ref.path.segments.last() . // `impl Into for self_ty` 1,955 ( 0.00%) && let Some(GenericArgs { args: [GenericArg::Type(target_ty)], .. }) = into_trait_seg.args 154 ( 0.00%) && span_is_local(item.span) 1,654 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::span_is_local (22x) 198 ( 0.00%) && let middle_trait_ref = cx.tcx.impl_trait_ref(item.owner_id).instantiate_identity().skip_norm_wip() 1,640 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::impl_trait_ref:: (22x) 110 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::Into, middle_trait_ref.def_id) 2,200 ( 0.00%) => ???:::is_diagnostic_item (22x) . && !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); . } . }, . ); . } 2,572 ( 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 ---------------------------------------- 8,698 ( 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/intravisit.rs -------------------------------------------------------------------------------- Ir -- line 81 ---------------------------------------- . Method(Ident, &'a FnSig<'a>), . . /// `|x, y| {}` . Closure, . } . . impl<'a> FnKind<'a> { . pub fn header(&self) -> Option<&FnHeader> { 23,358 ( 0.00%) match *self { 384 ( 0.00%) FnKind::ItemFn(_, _, ref header) => Some(header), 7,920 ( 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 230 ---------------------------------------- . /// nothing. **You probably don't want to override this method** -- . /// instead, override [`Self::NestedFilter`] or use the "shallow" or . /// "deep" visit patterns described at . /// [`intravisit`](self). The only reason to override . /// this method is if you want a nested pattern but cannot supply a . /// `TyCtxt`; see `maybe_tcx` for advice. . fn visit_nested_item(&mut self, id: ItemId) -> Self::Result { . if Self::NestedFilter::INTER { 184 ( 0.00%) let item = self.maybe_tcx().hir_item(id); 2,597 ( 0.00%) => ???:::hir_item (41x) . try_visit!(self.visit_item(item)); . } . Self::Result::output() . } . . /// Like `visit_nested_item()`, but for trait items. See . /// `visit_nested_item()` for advice on when to override this . /// method. -- line 246 ---------------------------------------- -- 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 { 7,716 ( 0.00%) let item = self.maybe_tcx().hir_impl_item(id); 122,752 ( 0.00%) => ???:::hir_impl_item (1,928x) . 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 { 39,581 ( 0.00%) let body = self.maybe_tcx().hir_body(id); 151,713 ( 0.00%) => ???:::hir_body (2,267x) . try_visit!(self.visit_body(body)); . } . Self::Result::output() . } . . fn visit_param(&mut self, param: &'v Param<'v>) -> Self::Result { . walk_param(self, param) . } . . /// Visits the top-level item and (optionally) nested items / impl items. See . /// `visit_nested_item` for details. . fn visit_item(&mut self, i: &'v Item<'v>) -> Self::Result { 184 ( 0.00%) walk_item(self, i) 23,586 ( 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_item::> (41x) . } . . fn visit_body(&mut self, b: &Body<'v>) -> Self::Result { . walk_body(self, b) . } . . /////////////////////////////////////////////////////////////////////////// . -- line 303 ---------------------------------------- -- line 311 ---------------------------------------- . walk_ident(self, ident) . } . 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) . } 56 ( 0.00%) fn visit_local(&mut self, l: &'v LetStmt<'v>) -> Self::Result { 30,885 ( 0.00%) walk_local(self, l) 7,760 ( 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::> (13x) 48 ( 0.00%) } 11,703 ( 0.00%) fn visit_block(&mut self, b: &'v Block<'v>) -> Self::Result { 199,543 ( 0.01%) walk_block(self, b) 2,441,803 ( 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_block::> (1,851x) 4,218 ( 0.00%) } 24 ( 0.00%) fn visit_stmt(&mut self, s: &'v Stmt<'v>) -> Self::Result { 29,320 ( 0.00%) walk_stmt(self, s) 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_stmt:: (2x) 6 ( 0.00%) } . fn visit_arm(&mut self, a: &'v Arm<'v>) -> Self::Result { 14,887 ( 0.00%) walk_arm(self, a) 3,944 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_arm::> (26x) . } . fn visit_pat(&mut self, p: &'v Pat<'v>) -> Self::Result { 98,061 ( 0.00%) walk_pat(self, p) 648 ( 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:: (14x) . } . 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 { 108 ( 0.00%) walk_pat_expr(self, expr) 166 ( 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_expr:: (7x) . } . fn visit_lit(&mut self, _hir_id: HirId, _lit: Lit, _is_negated_pat: bool) -> Self::Result { . Self::Result::output() . } . 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 { 2,357 ( 0.00%) walk_generic_arg(self, generic_arg) 20,303 ( 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::> (166x) . } . . /// 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 { 97,532 ( 0.00%) walk_ty(self, t) 8,580 ( 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::> (130x) . } . . 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 { 2,081 ( 0.00%) walk_const_arg(self, c) 1,233 ( 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::> (10x) . } . . #[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 { 265,726 ( 0.01%) walk_expr(self, ex) 4,445 ( 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:: (20x) . } . fn visit_expr_field(&mut self, field: &'v ExprField<'v>) -> Self::Result { 112 ( 0.00%) walk_expr_field(self, field) 4,563 ( 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_field::::expr_usage_requires_vec::{closure#0}, ()>> (56x) . } . 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 { . walk_ty_pat(self, p) . } . fn visit_generic_param(&mut self, p: &'v GenericParam<'v>) -> Self::Result { . walk_generic_param(self, p) . } . fn visit_const_param_default(&mut self, _param: HirId, ct: &'v ConstArg<'v>) -> Self::Result { . walk_const_param_default(self, ct) . } . fn visit_generics(&mut self, g: &'v Generics<'v>) -> Self::Result { 1,210 ( 0.00%) walk_generics(self, g) 14,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_generics:: (127x) . } . fn visit_where_predicate(&mut self, predicate: &'v WherePredicate<'v>) -> Self::Result { 62 ( 0.00%) walk_where_predicate(self, predicate) 8,774 ( 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_where_predicate:: (31x) . } . fn visit_fn_ret_ty(&mut self, ret_ty: &'v FnRetTy<'v>) -> Self::Result { . walk_fn_ret_ty(self, ret_ty) . } . fn visit_fn_decl(&mut self, fd: &'v FnDecl<'v>) -> Self::Result { 1,600 ( 0.00%) walk_fn_decl(self, fd) 225,054 ( 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_decl:: (644x) . } 16 ( 0.00%) fn visit_fn( . &mut self, . fk: FnKind<'v>, . fd: &'v FnDecl<'v>, . b: BodyId, . _: Span, . id: LocalDefId, . ) -> Self::Result { 6,625 ( 0.00%) walk_fn(self, fk, fd, b, id) 109,252 ( 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::>'2 (207x) 34 ( 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 { 5,787 ( 0.00%) walk_impl_item(self, ii) 3,641,980 ( 0.10%) => /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::> (1,928x) . } . 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 { 1 ( 0.00%) walk_impl_item_ref(self, *ii) . } . fn visit_trait_ref(&mut self, t: &'v TraitRef<'v>) -> Self::Result { 2 ( 0.00%) walk_trait_ref(self, t) 144 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_trait_ref:: (1x) . } . fn visit_param_bound(&mut self, bounds: &'v GenericBound<'v>) -> Self::Result { 730 ( 0.00%) walk_param_bound(self, bounds) 27,975 ( 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::> (145x) 43 ( 0.00%) } . 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 { 356 ( 0.00%) walk_poly_trait_ref(self, t) 14,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/intravisit.rs:rustc_hir::intravisit::walk_poly_trait_ref:: (89x) . } . fn visit_opaque_ty(&mut self, opaque: &'v OpaqueTy<'v>) -> Self::Result { . walk_opaque_ty(self, opaque) . } . fn visit_variant_data(&mut self, s: &'v VariantData<'v>) -> Self::Result { . walk_struct_def(self, s) . } . fn visit_field_def(&mut self, s: &'v FieldDef<'v>) -> Self::Result { 4 ( 0.00%) walk_field_def(self, s) 283 ( 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_field_def::> (2x) . } . fn visit_enum_def(&mut self, enum_definition: &'v EnumDef<'v>) -> Self::Result { . walk_enum_def(self, enum_definition) . } . 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. 181,146 ( 0.00%) fn visit_qpath(&mut self, qpath: &'v QPath<'v>, id: HirId, _span: Span) -> Self::Result { 675,087 ( 0.02%) walk_qpath(self, qpath, id) 293,554 ( 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:: (3,033x) 155,268 ( 0.00%) } . fn visit_path(&mut self, path: &Path<'v>, _id: HirId) -> Self::Result { 171,549 ( 0.00%) walk_path(self, path) 554,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_path::> (16,717x) . } . fn visit_path_segment(&mut self, path_segment: &'v PathSegment<'v>) -> Self::Result { 15,775 ( 0.00%) walk_path_segment(self, path_segment) 174,395 ( 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:: (3,287x) 3,518 ( 0.00%) } 3,537 ( 0.00%) fn visit_generic_args(&mut self, generic_args: &'v GenericArgs<'v>) -> Self::Result { 1,394 ( 0.00%) walk_generic_args(self, generic_args) 2,848 ( 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:: (1x) 438 ( 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::'2 (1x) 3,320 ( 0.00%) } 657 ( 0.00%) fn visit_assoc_item_constraint( . &mut self, . constraint: &'v AssocItemConstraint<'v>, . ) -> Self::Result { 195 ( 0.00%) walk_assoc_item_constraint(self, constraint) 8,529 ( 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::> (42x) . } . 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)); 13,280 ( 0.00%) visitor.visit_pat(pat) . } . 1,246 ( 0.00%) 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())); 750 ( 0.00%) match *kind { . ItemKind::ExternCrate(orig_name, ident) => { . visit_opt!(visitor, visit_name, orig_name); . try_visit!(visitor.visit_ident(ident)); . } . ItemKind::Use(ref path, kind) => { 34 ( 0.00%) try_visit!(visitor.visit_use(path, item.hir_id())); . match kind { . UseKind::Single(ident) => try_visit!(visitor.visit_ident(ident)), . UseKind::Glob | UseKind::ListStem => {} . } . } . ItemKind::Static(_, ident, ref typ, body) => { . try_visit!(visitor.visit_ident(ident)); . try_visit!(visitor.visit_ty_unambig(typ)); . try_visit!(visitor.visit_nested_body(body)); . } 42 ( 0.00%) ItemKind::Const(ident, ref generics, ref typ, rhs) => { . try_visit!(visitor.visit_ident(ident)); 7 ( 0.00%) try_visit!(visitor.visit_generics(generics)); 7 ( 0.00%) try_visit!(visitor.visit_ty_unambig(typ)); . try_visit!(visitor.visit_const_item_rhs(rhs)); . } 446 ( 0.00%) ItemKind::Fn { ident, sig, generics, body: body_id, .. } => { . try_visit!(visitor.visit_ident(ident)); . try_visit!(visitor.visit_fn( 6 ( 0.00%) FnKind::ItemFn(ident, generics, sig.header), . sig.decl, . body_id, . item.span, . item.owner_id.def_id, . )); . } . ItemKind::Macro(ident, _def, _kind) => { . try_visit!(visitor.visit_ident(ident)); -- line 564 ---------------------------------------- -- line 582 ---------------------------------------- . try_visit!(visitor.visit_generics(generics)); . try_visit!(visitor.visit_ty_unambig(ty)); . } . ItemKind::Enum(ident, ref generics, ref enum_definition) => { . try_visit!(visitor.visit_ident(ident)); . try_visit!(visitor.visit_generics(generics)); . try_visit!(visitor.visit_enum_def(enum_definition)); . } 8 ( 0.00%) ItemKind::Impl(Impl { generics, of_trait, self_ty, items, constness: _ }) => { . try_visit!(visitor.visit_generics(generics)); 1 ( 0.00%) if let Some(TraitImplHeader { . safety: _, . polarity: _, . defaultness: _, . defaultness_span: _, . trait_ref, 2 ( 0.00%) }) = of_trait . { . try_visit!(visitor.visit_trait_ref(trait_ref)); . } . try_visit!(visitor.visit_ty_unambig(self_ty)); . walk_list!(visitor, visit_impl_item_ref, items); . } . ItemKind::Struct(ident, ref generics, ref struct_definition) . | ItemKind::Union(ident, ref generics, ref struct_definition) => { . try_visit!(visitor.visit_ident(ident)); 1 ( 0.00%) try_visit!(visitor.visit_generics(generics)); . try_visit!(visitor.visit_variant_data(struct_definition)); . } . ItemKind::Trait { . impl_restriction, . constness: _, . is_auto: _, . safety: _, . ident, -- line 616 ---------------------------------------- -- line 628 ---------------------------------------- . } . ItemKind::TraitAlias(_constness, ident, ref generics, bounds) => { . try_visit!(visitor.visit_ident(ident)); . try_visit!(visitor.visit_generics(generics)); . walk_list!(visitor, visit_param_bound, bounds); . } . } . V::Result::output() 1,200 ( 0.00%) } . 147 ( 0.00%) pub fn walk_body<'v, V: Visitor<'v>>(visitor: &mut V, body: &Body<'v>) -> V::Result { . let Body { params, value } = body; 9,192 ( 0.00%) walk_list!(visitor, visit_param, *params); 17,516 ( 0.00%) visitor.visit_expr(*value) 6,442,255 ( 0.18%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr (2,954x) . } . . pub fn walk_ident<'v, V: Visitor<'v>>(visitor: &mut V, ident: Ident) -> V::Result { 3 ( 0.00%) 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; . walk_list!(visitor, visit_nested_item, item_ids.iter().copied()); . V::Result::output() . } . -- line 653 ---------------------------------------- -- line 670 ---------------------------------------- . ForeignItemKind::Static(ref typ, _, _) => { . try_visit!(visitor.visit_ty_unambig(typ)); . } . ForeignItemKind::Type => (), . } . V::Result::output() . } . 72,201 ( 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; 60,405 ( 0.00%) visit_opt!(visitor, visit_expr, *init); 77 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/utils.rs:::visit_expr (2x) . try_visit!(visitor.visit_id(*hir_id)); 12,344 ( 0.00%) try_visit!(visitor.visit_pat(*pat)); 39,504 ( 0.00%) visit_opt!(visitor, visit_block, *els); 25,854 ( 0.00%) visit_opt!(visitor, visit_ty_unambig, *ty); . V::Result::output() 66,323 ( 0.00%) } . 178,506 ( 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)); 66,002 ( 0.00%) walk_list!(visitor, visit_stmt, *stmts); 2,144 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:::visit_stmt (2x) 131,588 ( 0.00%) visit_opt!(visitor, visit_expr, *expr); 1,169 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/utils.rs:::visit_expr (1x) . V::Result::output() 53,653 ( 0.00%) } . 45,848 ( 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)); 189,328 ( 0.01%) match *kind { 15,768 ( 0.00%) StmtKind::Let(ref local) => visitor.visit_local(local), 233 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/utils.rs:::visit_local (2x) 46 ( 0.00%) StmtKind::Item(item) => visitor.visit_nested_item(item), . StmtKind::Expr(ref expression) | StmtKind::Semi(ref expression) => { 44,653 ( 0.00%) visitor.visit_expr(expression) 46 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/utils.rs:::visit_expr (2x) . } . } 766 ( 0.00%) } . 35,949 ( 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)); 18,106 ( 0.00%) try_visit!(visitor.visit_pat(*pat)); 58,154 ( 0.00%) visit_opt!(visitor, visit_expr, *guard); 3,343 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/macro_metavars_in_unsafe.rs:::visit_expr'2 (17x) 32,573 ( 0.00%) visitor.visit_expr(*body) 1,731 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/unconditional_recursion.rs:::visit_expr'2 (3x) 308 ( 0.00%) } . . 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)); . 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() . } . 534,347 ( 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)); 468,814 ( 0.01%) match *kind { 7,676 ( 0.00%) PatKind::TupleStruct(ref qpath, children, _) => { 2,638 ( 0.00%) try_visit!(visitor.visit_qpath(qpath, *hir_id, *span)); 18,417 ( 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 (531x) 9,691 ( 0.00%) walk_list!(visitor, visit_pat, children); . } 17,040 ( 0.00%) PatKind::Struct(ref qpath, fields, _) => { 5,375 ( 0.00%) try_visit!(visitor.visit_qpath(qpath, *hir_id, *span)); 55,535 ( 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,627x) 14,595 ( 0.00%) walk_list!(visitor, visit_pat_field, fields); . } 1,358 ( 0.00%) PatKind::Or(pats) => walk_list!(visitor, visit_pat, pats), 1,075 ( 0.00%) PatKind::Tuple(tuple_elements, _) => { 4,955 ( 0.00%) walk_list!(visitor, visit_pat, tuple_elements); . } . PatKind::Box(ref subpattern) . | PatKind::Deref(ref subpattern) . | PatKind::Ref(ref subpattern, _, _) => { 294 ( 0.00%) try_visit!(visitor.visit_pat(subpattern)); . } . PatKind::Binding(_, _hir_id, ident, ref optional_subpattern) => { . try_visit!(visitor.visit_ident(ident)); 133,516 ( 0.00%) visit_opt!(visitor, visit_pat, optional_subpattern); . } 1,777 ( 0.00%) PatKind::Expr(ref expression) => try_visit!(visitor.visit_pat_expr(expression)), . PatKind::Range(ref lower_bound, ref upper_bound, _) => { 51 ( 0.00%) visit_opt!(visitor, visit_pat_expr, lower_bound); 51 ( 0.00%) 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); . 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() 378,729 ( 0.01%) } . . 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)); 7,773 ( 0.00%) visitor.visit_pat(*pat) . } . 60 ( 0.00%) 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; 746 ( 0.00%) try_visit!(visitor.visit_id(*hir_id)); 3,634 ( 0.00%) match kind { . PatExprKind::Lit { lit, negated } => visitor.visit_lit(*hir_id, *lit, *negated), 4,944 ( 0.00%) PatExprKind::Path(qpath) => visitor.visit_qpath(qpath, *hir_id, *span), 10,893 ( 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 (293x) . } 72 ( 0.00%) } . . 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)); 124 ( 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,518,000 ( 0.10%) pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr<'v>) -> V::Result { . let Expr { hir_id, kind, span } = expression; 221,222 ( 0.01%) try_visit!(visitor.visit_id(*hir_id)); 2,089,049 ( 0.06%) match *kind { 1,622 ( 0.00%) ExprKind::Array(subexpressions) => { 7,850 ( 0.00%) walk_list!(visitor, visit_expr, subexpressions); 1,581 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 (5x) . } . ExprKind::ConstBlock(ref const_block) => { . try_visit!(visitor.visit_inline_const(const_block)) 166 ( 0.00%) } . ExprKind::Repeat(ref element, ref count) => { 267 ( 0.00%) try_visit!(visitor.visit_expr(element)); 141 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 (3x) 81 ( 0.00%) try_visit!(visitor.visit_const_arg_unambig(count)); . } 9,341 ( 0.00%) ExprKind::Struct(ref qpath, fields, ref optional_base) => { 11,450 ( 0.00%) try_visit!(visitor.visit_qpath(qpath, *hir_id, *span)); 33 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:::visit_qpath (1x) 8,222 ( 0.00%) walk_list!(visitor, visit_expr_field, fields); 14,042 ( 0.00%) match optional_base { 190 ( 0.00%) StructTailExpr::Base(base) => try_visit!(visitor.visit_expr(base)), . StructTailExpr::None . | StructTailExpr::NoneWithError(_) . | StructTailExpr::DefaultFields(_) => {} . } . } 3,543 ( 0.00%) ExprKind::Tup(subexpressions) => { 14,113 ( 0.00%) walk_list!(visitor, visit_expr, subexpressions); 668 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/utils.rs:::visit_expr'2 (1x) . } 82,266 ( 0.00%) ExprKind::Call(ref callee_expression, arguments) => { 117,913 ( 0.00%) try_visit!(visitor.visit_expr(callee_expression)); 102 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/utils.rs:::visit_expr'2 (1x) 140,702 ( 0.00%) walk_list!(visitor, visit_expr, arguments); 368 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/utils.rs:::visit_expr'2 (1x) . } 148,091 ( 0.00%) ExprKind::MethodCall(ref segment, receiver, arguments, _) => { 58,950 ( 0.00%) try_visit!(visitor.visit_path_segment(segment)); 270 ( 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_path_segment (54x) 121,821 ( 0.00%) try_visit!(visitor.visit_expr(receiver)); 2,322 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/visitors.rs:::check_expr::{closure#0}> as rustc_hir::intravisit::Visitor>::visit_expr'2 (28x) 82,229 ( 0.00%) walk_list!(visitor, visit_expr, arguments); 1,270 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/visitors.rs:::check_expr::{closure#0}> as rustc_hir::intravisit::Visitor>::visit_expr'2 (25x) . } . ExprKind::Use(expr, _) => { . try_visit!(visitor.visit_expr(expr)); . } . ExprKind::Binary(_, ref left_expression, ref right_expression) => { 7,771 ( 0.00%) try_visit!(visitor.visit_expr(left_expression)); 1,569 ( 0.00%) try_visit!(visitor.visit_expr(right_expression)); . } . ExprKind::AddrOf(_, _, ref subexpression) | ExprKind::Unary(_, ref subexpression) => { 5,857 ( 0.00%) try_visit!(visitor.visit_expr(subexpression)); . } . ExprKind::Cast(ref subexpression, ref typ) | ExprKind::Type(ref subexpression, ref typ) => { 433 ( 0.00%) try_visit!(visitor.visit_expr(subexpression)); 393 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::visit_expr'2 (4x) 106 ( 0.00%) try_visit!(visitor.visit_ty_unambig(typ)); . } . ExprKind::DropTemps(ref subexpression) => { 384 ( 0.00%) try_visit!(visitor.visit_expr(subexpression)); . } 895 ( 0.00%) ExprKind::Let(LetExpr { span: _, pat, ty, init, recovered: _ }) => { . // match the visit order in walk_local 1,686 ( 0.00%) try_visit!(visitor.visit_expr(init)); 12,689 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/utils.rs:::visit_expr'2 (13x) 872 ( 0.00%) try_visit!(visitor.visit_pat(pat)); 2,085 ( 0.00%) visit_opt!(visitor, visit_ty_unambig, ty); . } . ExprKind::If(ref cond, ref then, ref else_opt) => { 22,382 ( 0.00%) try_visit!(visitor.visit_expr(cond)); 2,144 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/while_let_on_iterator.rs:::visit_expr'2 (5x) 23,081 ( 0.00%) try_visit!(visitor.visit_expr(then)); 3,492 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr'2 (2x) 14,723 ( 0.00%) visit_opt!(visitor, visit_expr, else_opt); . } . ExprKind::Loop(ref block, ref opt_label, _, _) => { . visit_opt!(visitor, visit_label, opt_label); 2,072 ( 0.00%) try_visit!(visitor.visit_block(block)); . } 18,654 ( 0.00%) ExprKind::Match(ref subexpression, arms, _) => { 24,719 ( 0.00%) try_visit!(visitor.visit_expr(subexpression)); 760 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/unconditional_recursion.rs:::visit_expr'2 (2x) 29,803 ( 0.00%) walk_list!(visitor, visit_arm, arms); . } . ExprKind::Closure(&Closure { 1,617 ( 0.00%) def_id, . binder: _, 1,593 ( 0.00%) bound_generic_params, 1,495 ( 0.00%) fn_decl, 1,672 ( 0.00%) body, . capture_clause: _, . fn_decl_span: _, . fn_arg_span: _, . kind: _, . constness: _, . explicit_captures: _, . }) => { . walk_list!(visitor, visit_generic_param, bound_generic_params); 1,060 ( 0.00%) try_visit!(visitor.visit_fn(FnKind::Closure, fn_decl, body, *span, def_id)); 62 ( 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_fn (2x) 272 ( 0.00%) } . ExprKind::Block(ref block, ref opt_label) => { . visit_opt!(visitor, visit_label, opt_label); 35,242 ( 0.00%) try_visit!(visitor.visit_block(block)); . } . ExprKind::Assign(ref lhs, ref rhs, _) => { 3,196 ( 0.00%) try_visit!(visitor.visit_expr(rhs)); 680 ( 0.00%) try_visit!(visitor.visit_expr(lhs)); . } . ExprKind::AssignOp(_, ref left_expression, ref right_expression) => { 827 ( 0.00%) try_visit!(visitor.visit_expr(right_expression)); 167 ( 0.00%) try_visit!(visitor.visit_expr(left_expression)); . } . ExprKind::Field(ref subexpression, ident) => { 7,564 ( 0.00%) try_visit!(visitor.visit_expr(subexpression)); . try_visit!(visitor.visit_ident(ident)); . } . ExprKind::Index(ref main_expression, ref index_expression, _) => { 3,146 ( 0.00%) try_visit!(visitor.visit_expr(main_expression)); 690 ( 0.00%) try_visit!(visitor.visit_expr(index_expression)); . } 92,775 ( 0.00%) ExprKind::Path(ref qpath) => { 434,680 ( 0.01%) try_visit!(visitor.visit_qpath(qpath, *hir_id, *span)); 111 ( 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 (3x) . } . ExprKind::Break(ref destination, ref opt_expr) => { . visit_opt!(visitor, visit_label, &destination.label); 4,720 ( 0.00%) visit_opt!(visitor, visit_expr, opt_expr); . } . ExprKind::Continue(ref destination) => { . visit_opt!(visitor, visit_label, &destination.label); . } . ExprKind::Ret(ref optional_expression) => { 14,518 ( 0.00%) visit_opt!(visitor, visit_expr, optional_expression); . } . ExprKind::Become(ref expr) => try_visit!(visitor.visit_expr(expr)), . ExprKind::InlineAsm(ref asm) => { . try_visit!(visitor.visit_inline_asm(asm, *hir_id)); . } . ExprKind::OffsetOf(ref container, ref fields) => { . try_visit!(visitor.visit_ty_unambig(container)); . walk_list!(visitor, visit_ident, fields.iter().copied()); -- line 934 ---------------------------------------- -- 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,631,114 ( 0.04%) } . . 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)); 19,707 ( 0.00%) visitor.visit_expr(*expr) 41 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/utils.rs:::visit_expr'2 (1x) 7 ( 0.00%) } . . 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)); . try_visit!(visitor.visit_ident(*field)); -- line 962 ---------------------------------------- -- 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), . } . 14,714 ( 0.00%) pub fn walk_generic_arg<'v, V: Visitor<'v>>( . visitor: &mut V, . generic_arg: &'v GenericArg<'v>, . ) -> V::Result { 98,387 ( 0.00%) match generic_arg { 1,957 ( 0.00%) GenericArg::Lifetime(lt) => visitor.visit_lifetime(lt), 19,059 ( 0.00%) GenericArg::Type(ty) => visitor.visit_ty(ty), 13,907 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:::visit_ty (63x) . 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)) . } . } 4,264 ( 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() { 28,160 ( 0.00%) Some(ambig_ty) => visitor.visit_ty(ambig_ty), 10,428 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:::visit_ty (158x) . None => { . let Ty { hir_id, span, kind: _ } = typ; . visitor.visit_infer(*hir_id, *span, InferKind::Ty(typ)) . } . } . } . 605,348 ( 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)); . 318,061 ( 0.01%) match *kind { 170 ( 0.00%) 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) => { 7,493 ( 0.00%) try_visit!(visitor.visit_lifetime(lifetime)); 13,177 ( 0.00%) try_visit!(visitor.visit_ty_unambig(mutable_type.ty)); . } . TyKind::Never => {} 1,148 ( 0.00%) TyKind::Tup(tuple_element_types) => { 1,316 ( 0.00%) walk_list!(visitor, visit_ty_unambig, tuple_element_types); . } . TyKind::FnPtr(ref function_declaration) => { . walk_list!(visitor, visit_generic_param, function_declaration.generic_params); . try_visit!(visitor.visit_fn_decl(function_declaration.decl)); . } . TyKind::UnsafeBinder(ref unsafe_binder) => { . walk_list!(visitor, visit_generic_param, unsafe_binder.generic_params); . try_visit!(visitor.visit_ty_unambig(unsafe_binder.inner_ty)); . } 17,509 ( 0.00%) TyKind::Path(ref qpath) => { . try_visit!(visitor.visit_qpath(qpath, typ.hir_id, typ.span)); . } 8 ( 0.00%) 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) => { 124 ( 0.00%) try_visit!(visitor.visit_ty_unambig(ty)); 108 ( 0.00%) try_visit!(visitor.visit_const_arg_unambig(length)); . } 63 ( 0.00%) TyKind::TraitObject(bounds, ref lifetime) => { 12 ( 0.00%) for bound in bounds { . try_visit!(visitor.visit_poly_trait_ref(bound)); . } 4 ( 0.00%) try_visit!(visitor.visit_lifetime(lifetime)); . } . TyKind::InferDelegation(..) | TyKind::Err(_) => {} . TyKind::Pat(ty, pat) => { . try_visit!(visitor.visit_ty_unambig(ty)); . try_visit!(visitor.visit_pattern_type_pattern(pat)); . } . TyKind::FieldOf(ty, TyFieldPath { variant, field }) => { . try_visit!(visitor.visit_ty_unambig(ty)); -- line 1047 ---------------------------------------- -- 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() 272,160 ( 0.01%) } . . pub fn walk_const_item_rhs<'v, V: Visitor<'v>>( . visitor: &mut V, . ct_rhs: ConstItemRhs<'v>, . ) -> V::Result { 68 ( 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)) . } . } . } . 1,418 ( 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)); 947 ( 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() . } 92 ( 0.00%) ConstArgKind::Path(qpath) => visitor.visit_qpath(qpath, *hir_id, qpath.span()), 20 ( 0.00%) => ???:::span (4x) 109 ( 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) . } 1,273 ( 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 => {} . } 28,975 ( 0.00%) match *kind { . GenericParamKind::Lifetime { .. } => {} . GenericParamKind::Type { ref default, .. } => { 1,887 ( 0.00%) visit_opt!(visitor, visit_ty_unambig, default) . } . GenericParamKind::Const { ref ty, ref default } => { 6 ( 0.00%) try_visit!(visitor.visit_ty_unambig(ty)); 18 ( 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) . } . 26,531 ( 0.00%) pub fn walk_generics<'v, V: Visitor<'v>>(visitor: &mut V, generics: &'v Generics<'v>) -> V::Result { . let &Generics { 4,972 ( 0.00%) params, 9,944 ( 0.00%) predicates, . has_where_clause_predicates: _, . where_clause_span: _, . span: _, . } = generics; . walk_list!(visitor, visit_generic_param, params); 968 ( 0.00%) walk_list!(visitor, visit_where_predicate, predicates); 19,008 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs: as rustc_hir::intravisit::Visitor>::visit_where_predicate (75x) . V::Result::output() 24,248 ( 0.00%) } . 186 ( 0.00%) pub fn walk_where_predicate<'v, V: Visitor<'v>>( . visitor: &mut V, . predicate: &'v WherePredicate<'v>, . ) -> V::Result { 31 ( 0.00%) let &WherePredicate { hir_id, kind, span: _ } = predicate; . try_visit!(visitor.visit_id(hir_id)); 62 ( 0.00%) match *kind { . WherePredicateKind::BoundPredicate(WhereBoundPredicate { . ref bounded_ty, 62 ( 0.00%) bounds, 31 ( 0.00%) bound_generic_params, . origin: _, . }) => { 31 ( 0.00%) try_visit!(visitor.visit_ty_unambig(bounded_ty)); 86 ( 0.00%) walk_list!(visitor, visit_param_bound, bounds); 6,098 ( 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_param_bound (43x) . walk_list!(visitor, visit_generic_param, bound_generic_params); . } . WherePredicateKind::RegionPredicate(WhereRegionPredicate { . ref lifetime, . bounds, . in_where_clause: _, . }) => { . try_visit!(visitor.visit_lifetime(lifetime)); . walk_list!(visitor, visit_param_bound, bounds); . } . } . V::Result::output() 186 ( 0.00%) } . 6,732 ( 0.00%) 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; 7,562 ( 0.00%) walk_list!(visitor, visit_ty_unambig, *inputs); . visitor.visit_fn_ret_ty(output) 1,056 ( 0.00%) } . . pub fn walk_fn_ret_ty<'v, V: Visitor<'v>>(visitor: &mut V, ret_ty: &'v FnRetTy<'v>) -> V::Result { 20,699 ( 0.00%) if let FnRetTy::Return(output_ty) = *ret_ty { 6 ( 0.00%) try_visit!(visitor.visit_ty_unambig(output_ty)); . } . V::Result::output() . } . 55,812 ( 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)); 130 ( 0.00%) try_visit!(walk_fn_kind(visitor, function_kind)); . visitor.visit_nested_body(body_id) 37,272 ( 0.00%) } . . pub fn walk_fn_kind<'v, V: Visitor<'v>>(visitor: &mut V, function_kind: FnKind<'v>) -> V::Result { 9,366 ( 0.00%) match function_kind { . FnKind::ItemFn(_, generics, ..) => { . try_visit!(visitor.visit_generics(generics)); . } . FnKind::Closure | FnKind::Method(..) => {} . } . V::Result::output() . } . . pub fn walk_use<'v, V: Visitor<'v>>( . visitor: &mut V, . path: &'v UsePath<'v>, . hir_id: HirId, . ) -> V::Result { 68 ( 0.00%) let UsePath { segments, ref res, span } = *path; 918 ( 0.00%) for res in res.present_items() { . try_visit!(visitor.visit_path(&Path { segments, res, span }, hir_id)); . } . V::Result::output() . } . . pub fn walk_trait_item<'v, V: Visitor<'v>>( . visitor: &mut V, . trait_item: &'v TraitItem<'v>, -- line 1259 ---------------------------------------- -- 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) . } . 23,157 ( 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)); 2,573 ( 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)); . } . } 20,530 ( 0.00%) match *kind { 81 ( 0.00%) ImplItemKind::Const(ref ty, rhs) => { 27 ( 0.00%) try_visit!(visitor.visit_ty_unambig(ty)); . visitor.visit_const_item_rhs(rhs) . } 4,992 ( 0.00%) ImplItemKind::Fn(ref sig, body_id) => visitor.visit_fn( 11,112 ( 0.00%) FnKind::Method(impl_item.ident, sig), 2,496 ( 0.00%) sig.decl, . body_id, . impl_item.span, . impl_item.owner_id.def_id, 1,852 ( 0.00%) ), 50 ( 0.00%) ImplItemKind::Type(ref ty) => visitor.visit_ty_unambig(ty), . } 20,184 ( 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) . } . 7 ( 0.00%) 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)); 1,374 ( 0.00%) visitor.visit_path(*path, *hir_ref_id) 8 ( 0.00%) } . 4,240 ( 0.00%) pub fn walk_param_bound<'v, V: Visitor<'v>>( . visitor: &mut V, . bound: &'v GenericBound<'v>, . ) -> V::Result { 5,254 ( 0.00%) match *bound { 1,790 ( 0.00%) GenericBound::Trait(ref typ) => visitor.visit_poly_trait_ref(typ), 81,524 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:::visit_poly_trait_ref (173x) 6 ( 0.00%) GenericBound::Outlives(ref lifetime) => visitor.visit_lifetime(lifetime), . GenericBound::Use(args, _) => { . walk_list!(visitor, visit_precise_capturing_arg, args); . V::Result::output() . } . } 2,904 ( 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) => { . let PreciseCapturingNonLifetimeArg { hir_id, ident, res: _ } = param; . try_visit!(visitor.visit_id(hir_id)); . visitor.visit_ident(ident) . } . } . } . 801 ( 0.00%) pub fn walk_poly_trait_ref<'v, V: Visitor<'v>>( . visitor: &mut V, . trait_ref: &'v PolyTraitRef<'v>, . ) -> V::Result { 1 ( 0.00%) let PolyTraitRef { bound_generic_params, modifiers: _, trait_ref, span: _ } = trait_ref; 801 ( 0.00%) walk_list!(visitor, visit_generic_param, *bound_generic_params); . visitor.visit_trait_ref(trait_ref) 712 ( 0.00%) } . . pub fn walk_opaque_ty<'v, V: Visitor<'v>>(visitor: &mut V, opaque: &'v OpaqueTy<'v>) -> V::Result { 8 ( 0.00%) let &OpaqueTy { hir_id, def_id: _, bounds, origin: _, span: _ } = opaque; . try_visit!(visitor.visit_id(hir_id)); 5 ( 0.00%) walk_list!(visitor, visit_param_bound, bounds); . V::Result::output() . } . . pub fn walk_struct_def<'v, V: Visitor<'v>>( . visitor: &mut V, . struct_definition: &'v VariantData<'v>, . ) -> V::Result { . visit_opt!(visitor, visit_id, struct_definition.ctor_hir_id()); . walk_list!(visitor, visit_field_def, struct_definition.fields()); . V::Result::output() . } . 18 ( 0.00%) pub fn walk_field_def<'v, V: Visitor<'v>>( . visitor: &mut V, . FieldDef { . hir_id, . ident, . ty, . default, . span: _, . vis_span: _, . mut_restriction, . def_id: _, . safety: _, . }: &'v FieldDef<'v>, . ) -> V::Result { 8 ( 0.00%) if let RestrictionKind::Restricted(path) = mut_restriction.kind { . walk_list!(visitor, visit_path_segment, path.segments); . } . try_visit!(visitor.visit_id(*hir_id)); . try_visit!(visitor.visit_ident(*ident)); 6 ( 0.00%) visit_opt!(visitor, visit_anon_const, default); 2 ( 0.00%) visitor.visit_ty_unambig(*ty) . } . . pub fn walk_enum_def<'v, V: Visitor<'v>>( . visitor: &mut V, . enum_definition: &'v EnumDef<'v>, . ) -> V::Result { . let EnumDef { variants } = enum_definition; . walk_list!(visitor, visit_variant, *variants); -- line 1429 ---------------------------------------- -- 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) . } . 834,554 ( 0.02%) pub fn walk_qpath<'v, V: Visitor<'v>>( . visitor: &mut V, . qpath: &'v QPath<'v>, . id: HirId, . ) -> V::Result { 370,327 ( 0.01%) match *qpath { . QPath::Resolved(ref maybe_qself, ref path) => { 342,208 ( 0.01%) visit_opt!(visitor, visit_ty_unambig, maybe_qself); 171,104 ( 0.00%) visitor.visit_path(path, id) . } . QPath::TypeRelative(ref qself, ref segment) => { 3,716 ( 0.00%) try_visit!(visitor.visit_ty_unambig(qself)); 9,579 ( 0.00%) visitor.visit_path_segment(segment) . } . } 741,833 ( 0.02%) } . 9,699 ( 0.00%) pub fn walk_path<'v, V: Visitor<'v>>(visitor: &mut V, path: &Path<'v>) -> V::Result { . let Path { segments, span: _, res: _ } = path; 173,848 ( 0.00%) walk_list!(visitor, visit_path_segment, *segments); 4,546 ( 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_path_segment (47x) . V::Result::output() 31,241 ( 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; 2 ( 0.00%) try_visit!(visitor.visit_ident(*ident)); . try_visit!(visitor.visit_id(*hir_id)); 751,100 ( 0.02%) visit_opt!(visitor, visit_generic_args, *args); 38,202 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs: as rustc_hir::intravisit::Visitor>::visit_generic_args (171x) . V::Result::output() 7,684 ( 0.00%) } . 6,282 ( 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; 17,345 ( 0.00%) walk_list!(visitor, visit_generic_arg, *args); 149,098 ( 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_generic_arg (1,665x) 11,456 ( 0.00%) walk_list!(visitor, visit_assoc_item_constraint, *constraints); 12,032 ( 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 (63x) . V::Result::output() 5,584 ( 0.00%) } . 777 ( 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)); 485 ( 0.00%) try_visit!(visitor.visit_generic_args(*gen_args)); 1,407 ( 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 (67x) 551 ( 0.00%) match constraint.kind { 546 ( 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() 8 ( 0.00%) } . . pub fn walk_defaultness<'v, V: Visitor<'v>>(_: &mut V, _: &'v Defaultness) -> V::Result { . // No visitable content here: this fn exists so you can call it if . // the right thing to do, should content be added in the future, . // would be to walk it. . V::Result::output() . } . -- line 1529 ---------------------------------------- 1,156,412 ( 0.03%) -------------------------------------------------------------------------------- -- 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 124,292 ( 0.00%) if let ExprKind::Binary(ref op, left, right) = expr.kind 1,690 ( 0.00%) && BinOpKind::Mul == op.node 238 ( 0.00%) && !expr.span.from_expansion() 238 ( 0.00%) && let Some((receiver, refs_count)) = simplify(cx, left, right) . && (!is_in_const_context(cx) || self.msrv.meets(cx, msrvs::CONST_SIZE_OF_VAL)) . { . let ctxt = expr.span.ctxt(); . let mut app = Applicability::MachineApplicable; . let deref = if refs_count > 0 { . "*".repeat(refs_count - 1) . } else { . "&".into() -- line 67 ---------------------------------------- -- line 74 ---------------------------------------- . MANUAL_SLICE_SIZE_CALCULATION, . expr.span, . "manual slice size calculation", . "try", . format!("{sugg}::mem::size_of_val({deref}{val_name})"), . app, . ); . } 497,168 ( 0.01%) } . } . . fn simplify<'tcx>( . cx: &LateContext<'tcx>, . expr1: &'tcx Expr<'tcx>, . expr2: &'tcx Expr<'tcx>, . ) -> Option<(&'tcx Expr<'tcx>, usize)> { 476 ( 0.00%) let expr1 = expr_or_init(cx, expr1); 8,084 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::expr_or_init (119x) 476 ( 0.00%) let expr2 = expr_or_init(cx, expr2); 4,189 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::expr_or_init (119x) . 952 ( 0.00%) simplify_half(cx, expr1, expr2).or_else(|| simplify_half(cx, expr2, expr1)) 9,055 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_slice_size_calculation.rs:clippy_lints::manual_slice_size_calculation::simplify_half (238x) . } . 1,666 ( 0.00%) fn simplify_half<'tcx>( . cx: &LateContext<'tcx>, . expr1: &'tcx Expr<'tcx>, . expr2: &'tcx Expr<'tcx>, . ) -> Option<(&'tcx Expr<'tcx>, usize)> { 476 ( 0.00%) if !expr1.span.from_expansion() . // expr1 is `[T1].len()`? 848 ( 0.00%) && let ExprKind::MethodCall(method_path, receiver, [], _) = expr1.kind 67 ( 0.00%) && method_path.ident.name == sym::len 111 ( 0.00%) && let receiver_ty = cx.typeck_results().expr_ty(receiver) 1,492 ( 0.00%) => ???:::expr_ty (37x) 148 ( 0.00%) && let (receiver_ty, refs_count, _) = peel_and_count_ty_refs(receiver_ty) 493 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::peel_and_count_ty_refs (37x) 96 ( 0.00%) && let ty::Slice(ty1) = receiver_ty.kind() . // expr2 is `size_of::()`? . && let ExprKind::Call(func, []) = expr2.kind . && let ExprKind::Path(ref func_qpath) = func.kind . && let Some(def_id) = cx.qpath_res(func_qpath, func.hir_id).opt_def_id() . && cx.tcx.is_diagnostic_item(sym::mem_size_of, def_id) . && let Some(ty2) = cx.typeck_results().node_args(func.hir_id).types().next() . // T1 == T2? . && *ty1 == ty2 . { . Some((receiver, refs_count)) . } else { . None . } 2,142 ( 0.00%) } 550 ( 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 { 14,432 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &ast::Item) { . // Handle module items: push state for their children. 5,708 ( 0.00%) match &item.kind { . ItemKind::Mod(.., ModKind::Loaded(_, Inline::No { .. }, mod_spans, ..)) => { 340 ( 0.00%) let file = cx.sess().source_map().lookup_source_file(mod_spans.inner_span.lo()); 9,452 ( 0.00%) => ???:::lookup_source_file (68x) . 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); 6 ( 0.00%) return; . }, . _ => {}, . } . . // Skip items from macro expansion. 3,460 ( 0.00%) if item.span.from_expansion() { . return; . } . . // Only lint inside mod.rs files (not at crate root depth). 2,148 ( 0.00%) if !self.module_stack.last().copied().unwrap_or(false) { . return; . } . 39 ( 0.00%) let Some(kind) = definition_kind(item) else { . return; . }; . 40 ( 0.00%) let help = if let Some(ident) = item.kind.ident() { 70 ( 0.00%) format!("move {kind} `{ident}` to a dedicated file") . } else { 9 ( 0.00%) format!("move the {kind} to a dedicated file") . }; . . span_lint_and_help( . cx, . DEFINITION_IN_MODULE_ROOT, 13 ( 0.00%) item.span, . "definition in module root file", 26 ( 0.00%) None, . help, . ); 14,432 ( 0.00%) } . . fn check_item_post(&mut self, _: &EarlyContext<'_>, item: &ast::Item) { 14,432 ( 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 { 136 ( 0.00%) if let FileName::Real(name) = &file.name { . name.local_path() 68 ( 0.00%) .and_then(|p| p.file_name()) 14,478 ( 0.00%) => ???:::file_name (68x) . .is_some_and(|n| n == "mod.rs") . } else { . false . } . } 322 ( 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 310 ( 0.00%) fn visit_type(ty: &Ty, cx: &EarlyContext<'_>, reason: &'static str) { 216 ( 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) => { . // Match the 'static lifetime 4 ( 0.00%) if let Some(lifetime) = *optional_lifetime { . match borrow_type.ty.kind { . TyKind::Path(..) | TyKind::Slice(..) | TyKind::Array(..) | TyKind::Tup(..) . if lifetime.ident.name == kw::StaticLifetime => . { . let snip = snippet(cx, borrow_type.ty.span, ""); . let sugg = format!("&{}{snip}", borrow_type.mutbl.prefix_str()); . span_lint_and_then(cx, REDUNDANT_STATIC_LIFETIMES, lifetime.ident.span, reason, |diag| { . diag.span_suggestion( -- line 73 ---------------------------------------- -- line 76 ---------------------------------------- . sugg, . Applicability::MachineApplicable, //snippet . ); . }); . }, . _ => {}, . } . } 10 ( 0.00%) Self::visit_type(&borrow_type.ty, cx, reason); 50 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/redundant_static_lifetimes.rs:::visit_type'2 (2x) . }, . _ => {}, . } 248 ( 0.00%) } . } . . impl EarlyLintPass for RedundantStaticLifetimes { . fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 16,236 ( 0.00%) if !self.msrv.meets(msrvs::STATIC_IN_CONST) { 43,296 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (1,804x) . return; . } . . if !item.span.from_expansion() { 6,197 ( 0.00%) if let ItemKind::Const(ConstItem { ty: ref var_type, .. }) = item.kind { 100 ( 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) . } . 4 ( 0.00%) if let ItemKind::Static(StaticItem { ty: ref var_type, .. }) = item.kind { 12 ( 0.00%) Self::visit_type(var_type, cx, "statics have by default a `'static` lifetime"); . } . } . } . . extract_msrv_attr!(); . } 1,863 ( 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)] 20,576 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 12,860 ( 0.00%) if cx.tcx.data_layout.pointer_size().bits() != 64 { . return; . } . if let ItemKind::Enum(_, _, def) = &item.kind { 28 ( 0.00%) for var in def.variants { 387 ( 0.00%) if let Some(anon_const) = &var.disr_expr { 96 ( 0.00%) let def_id = cx.tcx.hir_body_owner_def_id(anon_const.body); 3,120 ( 0.00%) => ???:::hir_body_owner_def_id (24x) . let mut ty = cx . .tcx . .type_of(def_id.to_def_id()) . .instantiate_identity() . .skip_norm_wip(); 120 ( 0.00%) let constant = cx.tcx.const_eval_poly(def_id.to_def_id()).ok(); 9,552 ( 0.00%) => ???:::const_eval_poly (24x) 288 ( 0.00%) if let Some(Constant::Int(val)) = constant.and_then(|c| mir_to_const(cx.tcx, c, ty)) { 1,032 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:clippy_utils::consts::mir_to_const (24x) 72 ( 0.00%) if let ty::Adt(adt, _) = ty.kind() . && adt.is_enum() . { . ty = adt.repr().discr_type().to_ty(cx.tcx); . } 96 ( 0.00%) match ty.kind() { . ty::Int(IntTy::Isize) => { 48 ( 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", . ); . } . } . } . } 20,576 ( 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; . 6,395 ( 0.00%) fn docs_link(diag: &mut Diag<'_, ()>, lint: &'static Lint) { 2,558 ( 0.00%) if env::var("CLIPPY_DISABLE_DOCS_LINKS").is_err() 5,116 ( 0.00%) && let Some(lint) = lint.name_lower().strip_prefix("clippy::") 168,123 ( 0.00%) => ???:::name_lower (1,279x) . { 7,674 ( 0.00%) diag.help(format!( . "for further information visit https://rust-lang.github.io/rust-clippy/{}/index.html#{lint}", . match option_env!("CFG_RELEASE_CHANNEL") { . // Clippy version is 0.1.xx . // . // Always use .0 because we do not generate separate lint doc pages for rust patch releases . Some("stable") => concat!("rust-1.", env!("CARGO_PKG_VERSION_PATCH"), ".0"), . Some("beta") => "beta", 3,837 ( 0.00%) _ => "main", . } . )); . } 5,116 ( 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) { 2,177 ( 0.00%) span_lint_and_then(cx, lint, sp, msg, |_| {}); 359,850 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::{closure#0}> (7x) . } . . /// 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, . ) { 380 ( 0.00%) span_lint_and_then(cx, lint, span, msg, |diag| { 260,483 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::{closure#0}> (1x) 34 ( 0.00%) if let Some(help_span) = help_span { . diag.span_help(help_span, help.into()); . } else { . diag.help(help.into()); . } . }); . } . . /// Like [`span_lint`] but with a `note` section instead of a `help` message. -- line 162 ---------------------------------------- -- line 200 ---------------------------------------- . pub fn span_lint_and_note( . cx: &T, . lint: &'static Lint, . span: impl Into, . msg: impl Into, . note_span: Option, . note: impl Into, . ) { 12 ( 0.00%) span_lint_and_then(cx, lint, span, msg, |diag| { 1,443 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::{closure#0}> (1x) . if let Some(note_span) = note_span { . diag.span_note(note_span, note.into()); . } else { . diag.note(note.into()); . } . }); . } . -- line 216 ---------------------------------------- -- 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] 52,334 ( 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 { 15,015 ( 0.00%) fn into_diag(self, dcx: DiagCtxtHandle<'a>, level: Level) -> Diag<'a, ()> { . let mut lint = Diag::new(dcx, level, ""); . (self.0)(&mut lint); 5,701 ( 0.00%) lint 9,314 ( 0.00%) } . } . . let sp = sp.into(); . #[expect(clippy::disallowed_methods)] 5,898 ( 0.00%) cx.emit_span_lint( 1,193 ( 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}>> (1x) . lint, . sp.clone(), 86,007 ( 0.00%) ClippyDiag(|diag: &mut Diag<'_, ()>| { 30 ( 0.00%) => ???:0x0000000000173dc0 (1x) 2,545 ( 0.00%) diag.primary_message(msg); 2,544 ( 0.00%) diag.span(sp); 43 ( 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:: (1x) 3,629 ( 0.00%) f(diag); 4,620 ( 0.00%) docs_link(diag, lint); 2,804 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::docs_link (1x) . . #[cfg(debug_assertions)] . validate_diag(diag); . }), . ); 30,048 ( 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)] 380 ( 0.00%) cx.tcx.emit_node_span_lint( 9,079,897 ( 0.25%) => /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::::check_collapsible_if_if::{closure#0}>::{closure#0}>> (20x) . lint, . hir_id, . sp, 1,474 ( 0.00%) rustc_errors::DiagDecorator(|diag| { 52 ( 0.00%) diag.primary_message(msg); 552 ( 0.00%) f(diag); 386 ( 0.00%) docs_link(diag, lint); 16,857 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::docs_link (6x) . . #[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,157 ( 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, . ) { 499 ( 0.00%) span_lint_and_then(cx, lint, sp, msg.into(), |diag| { 98 ( 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(()); . }); 696 ( 0.00%) } 77,409 ( 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; . 173,524 ( 0.00%) 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). 86,762 ( 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 ---------------------------------------- 718 ( 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 { 248,584 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { 125,544 ( 0.00%) if let ExprKind::Lit(lit) = expr.kind 8,727 ( 0.00%) && let LitKind::Str(_, _) | LitKind::Char(_) = lit.node . { 2,504 ( 0.00%) check_str(cx, lit.span, expr.hir_id); . } 310,730 ( 0.01%) } . } . . fn escape>(s: T) -> String { . let mut result = String::new(); . for c in s { . if c as u32 > 0x7F { . for d in c.escape_unicode() { . result.push(d); -- line 96 ---------------------------------------- -- line 98 ---------------------------------------- . } else { . result.push(c); . } . } . result . } . . fn check_str(cx: &LateContext<'_>, span: Span, id: HirId) { 5,008 ( 0.00%) if !span_is_local(span) { 189,018 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::span_is_local (1,252x) . 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 ---------------------------------------- -- line 129 ---------------------------------------- . .replace('\u{ad}', "\\u{AD}") . .replace('\u{2060}', "\\u{2060}"), . Applicability::MachineApplicable, . ); . } . }); . } . 18 ( 0.00%) if string.chars().any(|c| c as u32 > 0x7F) { 81 ( 0.00%) span_lint_and_then( 11,994 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (9x) . cx, . NON_ASCII_LITERAL, . span, . "literal non-ASCII character detected", 72 ( 0.00%) |diag| { . if is_raw { . diag.help("use a normal string literal instead of a raw one to escape the character"); . } else { . diag.span_suggestion( . span, . "consider replacing the string with", . if is_lint_allowed(cx, UNICODE_NOT_NFC, id) { . escape(string.chars()) -- line 151 ---------------------------------------- -- line 154 ---------------------------------------- . }, . Applicability::MachineApplicable, . ); . } . }, . ); . } . 90 ( 0.00%) if is_lint_allowed(cx, NON_ASCII_LITERAL, id) && string.chars().zip(string.nfc()).any(|(a, b)| a != b) { 6,897 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (9x) . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then(cx, UNICODE_NOT_NFC, span, "non-NFC Unicode sequence detected", |diag| { . diag.span_suggestion( . span, . "consider replacing the string with", . string.nfc().collect::(), . Applicability::MachineApplicable, . ); -- line 170 ---------------------------------------- 2,504 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/bool_assert_comparison.rs -------------------------------------------------------------------------------- Ir -- line 33 ---------------------------------------- . pub BOOL_ASSERT_COMPARISON, . style, . "Using a boolean as comparison value in an assert_* macro when there is no need" . } . . declare_lint_pass!(BoolAssertComparison => [BOOL_ASSERT_COMPARISON]); . . fn extract_bool_lit(e: &Expr<'_>) -> Option { 264 ( 0.00%) if let ExprKind::Lit(Lit { . node: LitKind::Bool(b), .. . }) = e.kind . && !e.span.from_expansion() . { . Some(b) . } else { . None . } -- line 49 ---------------------------------------- -- line 68 ---------------------------------------- . .tcx . .normalize_erasing_regions(cx.typing_env(), Unnormalized::new_wip(proj)); . . nty.is_bool() . }) . } . . impl<'tcx> LateLintPass<'tcx> for BoolAssertComparison { 559,314 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 3,066 ( 0.00%) let Some(macro_call) = root_macro_call_first_node(cx, expr) else { . return; . }; 7,197 ( 0.00%) let eq_macro = match cx.tcx.get_diagnostic_name(macro_call.def_id) { 43,226 ( 0.00%) => ???:::get_diagnostic_name (511x) . Some(sym::assert_eq_macro | sym::debug_assert_eq_macro) => true, . Some(sym::assert_ne_macro | sym::debug_assert_ne_macro) => false, . _ => return, . }; 390 ( 0.00%) let Some((a, b, _)) = find_assert_eq_args(cx, expr, macro_call.expn) else { 100,512 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::find_assert_eq_args (39x) . return; . }; . 156 ( 0.00%) let a_span = a.span.source_callsite(); 936 ( 0.00%) => ???:::source_callsite (39x) 117 ( 0.00%) let b_span = b.span.source_callsite(); 936 ( 0.00%) => ???:::source_callsite (39x) . 156 ( 0.00%) let (lit_span, bool_value, non_lit_expr) = match (extract_bool_lit(a), extract_bool_lit(b)) { . // assert_eq!(true/false, b) . // ^^^^^^^^^^^^ . (Some(bool_value), None) => (a_span.until(b_span), bool_value, b), . // assert_eq!(a, true/false) . // ^^^^^^^^^^^^ . (None, Some(bool_value)) => (b_span.with_lo(a_span.hi()), bool_value, a), . // If there are two boolean arguments, we definitely don't understand . // what's going on, so better leave things as is... -- line 100 ---------------------------------------- -- line 148 ---------------------------------------- . . diag.multipart_suggestion( . format!("replace it with `{non_eq_mac}!(..)`"), . suggestions, . applicability, . ); . }, . ); 497,168 ( 0.01%) } . } 44 ( 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>) { 242,752 ( 0.01%) if let ExprKind::MethodCall(_method, receiver, args, _) = expr.kind { . for arg in args { 11,235 ( 0.00%) check_closure(cx, Some(receiver), arg); 1,430,118 ( 0.04%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_closure (3,745x) . } . } 18,636 ( 0.00%) if let ExprKind::Call(func, args) = expr.kind { 18,636 ( 0.00%) check_closure(cx, None, func); 111,816 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_closure (6,212x) . for arg in args { 23,706 ( 0.00%) check_closure(cx, None, arg); 151,108 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_closure (7,902x) . } . } . } . } . . #[expect(clippy::too_many_lines)] 142,872 ( 0.00%) fn check_closure<'tcx>(cx: &LateContext<'tcx>, outer_receiver: Option<&Expr<'tcx>>, expr: &Expr<'tcx>) { 35,981 ( 0.00%) let body = if let ExprKind::Closure(c) = expr.kind 787 ( 0.00%) && c.fn_decl.inputs.iter().all(|ty| matches!(ty.kind, TyKind::Infer(()))) 526 ( 0.00%) && matches!(c.fn_decl.output, FnRetTy::DefaultReturn(_)) 526 ( 0.00%) && !expr.span.from_expansion() . { 1,578 ( 0.00%) cx.tcx.hir_body(c.body) 21,853 ( 0.00%) => ???:::hir_body (263x) . } else { . return; . }; . 789 ( 0.00%) if body.value.span.from_expansion() { 3 ( 0.00%) 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, . expr.hir_id, -- line 110 ---------------------------------------- -- line 119 ---------------------------------------- . ); . }, . ); . } . // skip `foo(|| macro!())` . return; . } . 1,300 ( 0.00%) if is_adjusted(cx, body.value) { 11,740 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_adjusted (260x) . return; . } . . let typeck = cx.typeck_results(); 780 ( 0.00%) let closure = if let ty::Closure(_, closure_subs) = typeck.expr_ty(expr).kind() { 10,412 ( 0.00%) => ???:::expr_ty (260x) 260 ( 0.00%) closure_subs.as_closure() . } else { . return; . }; 1,560 ( 0.00%) let closure_sig = cx.tcx.signature_unclosure(closure.sig(), Safety::Safe).skip_binder(); 51,572 ( 0.00%) => ???:::signature_unclosure (260x) 13,000 ( 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 (260x) 1,358 ( 0.00%) match body.value.kind { 344 ( 0.00%) ExprKind::Call(callee, args) 86 ( 0.00%) if matches!( 43 ( 0.00%) callee.kind, . ExprKind::Path(QPath::Resolved(..) | QPath::TypeRelative(..)) . ) => . { 129 ( 0.00%) let callee_ty_raw = typeck.expr_ty(callee); 1,720 ( 0.00%) => ???:::expr_ty (43x) . let callee_ty = callee_ty_raw.peel_refs(); . if matches!(callee_ty.opt_diag_name(cx), Some(sym::Arc | sym::Rc)) 387 ( 0.00%) || !check_inputs(typeck, body.params, None, args) 2,205 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_inputs (43x) . { . return; . } . 4 ( 0.00%) let callee_ty_adjustments = typeck.expr_adjustments(callee); 144 ( 0.00%) => ???:::expr_adjustments (4x) 4 ( 0.00%) let callee_ty_adjusted = callee_ty_adjustments.last().map_or(callee_ty, |a| a.target); . 16 ( 0.00%) let sig = match *callee_ty_adjusted.kind() { 8 ( 0.00%) ty::FnDef(def, _) => { . // Rewriting `x(|| f())` to `x(f)` where f is marked `#[track_caller]` moves the `Location` 26 ( 0.00%) if find_attr!(cx.tcx, def, TrackCaller(..)) { 5,524 ( 0.00%) => ???:>::get_attrs (4x) . return; . } . . cx.tcx.fn_sig(def).skip_binder().skip_binder() . }, . ty::FnPtr(sig_tys, hdr) => sig_tys.with(hdr).skip_binder(), . ty::Closure(_, subs) => cx . .tcx -- line 167 ---------------------------------------- -- line 174 ---------------------------------------- . && let ty::Tuple(tys) = *subs.type_at(1).kind() . { . cx.tcx.mk_fn_sig_safe_rust_abi(tys, output) . } else { . return; . } . }, . }; 8 ( 0.00%) if let Some(outer) = outer_receiver 20 ( 0.00%) && ty_has_static(sig.output()) 760 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::ty_has_static (4x) . && let generic_args = typeck.node_args(outer.hir_id) . // HACK: Given a closure in `T.method(|| f())`, where `fn f() -> U where U: 'static`, `T.method(f)` . // will succeed iff `T: 'static`. But the region of `T` is always erased by `typeck.expr_ty()` when . // T is a generic type. For example, return type of `Option::as_deref()` is a generic. . // So we have a hack like this. . && !generic_args.is_empty() . { . return; . } 12 ( 0.00%) if check_sig(closure_sig, sig) 461 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_sig (4x) 16 ( 0.00%) && let generic_args = typeck.node_args(callee.hir_id) 141 ( 0.00%) => ???:::node_args (4x) . // Given some trait fn `fn f() -> ()` and some type `T: Trait`, `T::f` is not . // `'static` unless `T: 'static`. The cast `T::f as fn()` will, however, result . // in a type which is `'static`. . // For now ignore all callee types which reference a type parameter. 2 ( 0.00%) && !generic_args.types().any(|t| matches!(t.kind(), ty::Param(_))) . // Rule out `AsyncFn*`s, because while they can be called as `|x| f(x)`, . // they can't be passed directly into a place expecting an `Fn*` (#13892) 24 ( 0.00%) && let Ok((closure_kind, _)) = cx . .tcx . .infer_ctxt() 36 ( 0.00%) .build(cx.typing_mode()) 408 ( 0.00%) => ???:::build (4x) 60 ( 0.00%) => ???:::typing_mode (4x) 8 ( 0.00%) .err_ctxt() 36 ( 0.00%) => ???:::err_ctxt (4x) 20 ( 0.00%) .type_implements_fn_trait( 92,000 ( 0.00%) => ???:::type_implements_fn_trait (4x) 4 ( 0.00%) cx.param_env, . Binder::bind_with_vars(callee_ty_adjusted, List::empty()), . ty::PredicatePolarity::Positive, . ) . { . span_lint_hir_and_then( . cx, 8 ( 0.00%) REDUNDANT_CLOSURE, 8 ( 0.00%) expr.hir_id, 4 ( 0.00%) expr.span, . "redundant closure", . |diag| { 28 ( 0.00%) if let Some(mut snippet) = snippet_opt(cx, callee.span) { . let n_refs = callee_ty_adjustments . .iter() . .rev() . .fold(0, |acc, adjustment| match adjustment.kind { . Adjust::Deref(DerefAdjustKind::Overloaded(_)) => acc + 1, . Adjust::Deref(_) if acc > 0 => acc + 1, . _ => acc, . }); -- line 228 ---------------------------------------- -- line 242 ---------------------------------------- . ClosureKind::FnMut => snippet = format!("&mut {snippet}"), . ClosureKind::Fn if !callee_ty_raw.is_ref() => { . snippet = format!("&{snippet}"); . }, . _ => (), . } . } . 12 ( 0.00%) let replace_with = match callee_ty_adjusted.kind() { 20 ( 0.00%) ty::FnDef(def, _) => cx.tcx.def_descr(*def), 2,282 ( 0.00%) => ???:::def_descr (4x) . _ => "function", . }; . diag.span_suggestion( 4 ( 0.00%) expr.span, 12 ( 0.00%) format!("replace the closure with the {replace_with} itself"), 28 ( 0.00%) snippet, . Applicability::MachineApplicable, . ); . } . }, . ); 12 ( 0.00%) } 1,934 ( 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:: (4x) 68 ( 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:: (4x) . }, 996 ( 0.00%) ExprKind::MethodCall(path, self_, args, _) if check_inputs(typeck, body.params, Some(self_), args) => { 9,265 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_inputs (101x) 232 ( 0.00%) if let Some(method_def_id) = typeck.type_dependent_def_id(body.value.hir_id) 1,479 ( 0.00%) => ???:::type_dependent_def_id (29x) 679 ( 0.00%) && !find_attr!(cx.tcx, method_def_id, TrackCaller(..)) 101,601 ( 0.00%) => ???:>::get_attrs (29x) 87 ( 0.00%) && check_sig(closure_sig, cx.tcx.fn_sig(method_def_id).skip_binder().skip_binder()) 3,298 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::check_sig (29x) . { 54 ( 0.00%) let mut app = Applicability::MachineApplicable; 27 ( 0.00%) let generic_args = match path.args.and_then(GenericArgs::span_ext) { . Some(span) => format!("::{}", snippet_with_applicability(cx, span, "<..>", &mut app)), . None => String::new(), . }; . span_lint_hir_and_then( . cx, 54 ( 0.00%) REDUNDANT_CLOSURE_FOR_METHOD_CALLS, 54 ( 0.00%) expr.hir_id, 27 ( 0.00%) expr.span, . "redundant closure", 54 ( 0.00%) |diag| { . let args = typeck.node_args(body.value.hir_id); . let caller = self_.hir_id.owner.def_id; . let type_name = get_path_from_caller_to_method_type(cx.tcx, caller, method_def_id, args); . diag.span_suggestion( . expr.span, . "replace the closure with the method itself", . format!("{}::{}{}", type_name, path.ident.name, generic_args), . app, . ); . }, . ); . } . }, . _ => (), . } 142,872 ( 0.00%) } . 1,152 ( 0.00%) fn check_inputs( . typeck: &TypeckResults<'_>, . params: &[Param<'_>], . self_arg: Option<&Expr<'_>>, . args: &[Expr<'_>], . ) -> bool { 720 ( 0.00%) params.len() == self_arg.map_or(0, |_| 1) + args.len() . && params.iter().zip(self_arg.into_iter().chain(args)).all(|(p, arg)| { 424 ( 0.00%) matches!( 126 ( 0.00%) p.pat.kind, . PatKind::Binding(BindingMode::NONE, id, _, None) 52 ( 0.00%) if arg.res_local_id() == Some(id) . ) . // Only allow adjustments which change regions (i.e. re-borrowing). . && typeck 156 ( 0.00%) .expr_adjustments(arg) 2,179 ( 0.00%) => ???:::expr_adjustments (52x) . .last() 126 ( 0.00%) .is_none_or(|a| a.target == typeck.expr_ty(arg)) 1,692 ( 0.00%) => ???:::expr_ty (42x) . }) 1,152 ( 0.00%) } . 165 ( 0.00%) fn check_sig<'tcx>(closure_sig: FnSig<'tcx>, call_sig: FnSig<'tcx>) -> bool { 66 ( 0.00%) call_sig.safety().is_safe() && !has_late_bound_to_non_late_bound_regions(closure_sig, call_sig) 264 ( 0.00%) } . . /// This walks through both signatures and checks for any time a late-bound region is expected by an . /// `impl Fn` type, but the target signature does not have a late-bound region in the same position. . /// . /// This is needed because rustc is unable to late bind early-bound regions in a function signature. . fn has_late_bound_to_non_late_bound_regions(from_sig: FnSig<'_>, to_sig: FnSig<'_>) -> bool { . fn check_region(from_region: Region<'_>, to_region: Region<'_>) -> bool { 26 ( 0.00%) from_region.is_bound() && !to_region.is_bound() . } . . fn check_subs(from_subs: &[GenericArg<'_>], to_subs: &[GenericArg<'_>]) -> bool { 54 ( 0.00%) if from_subs.len() != to_subs.len() { . return true; . } . for (from_arg, to_arg) in to_subs.iter().zip(from_subs) { 10 ( 0.00%) match (from_arg.kind(), to_arg.kind()) { . (GenericArgKind::Lifetime(from_region), GenericArgKind::Lifetime(to_region)) => { . if check_region(from_region, to_region) { . return true; . } . }, . (GenericArgKind::Type(from_ty), GenericArgKind::Type(to_ty)) => { 10 ( 0.00%) if check_ty(from_ty, to_ty) { 128 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::has_late_bound_to_non_late_bound_regions::check_ty'2 (5x) . return true; . } . }, . (GenericArgKind::Const(_), GenericArgKind::Const(_)) => (), . _ => return true, . } . } . false . } . 497 ( 0.00%) fn check_ty(from_ty: Ty<'_>, to_ty: Ty<'_>) -> bool { 760 ( 0.00%) match (from_ty.kind(), to_ty.kind()) { 54 ( 0.00%) (&ty::Adt(_, from_subs), &ty::Adt(_, to_subs)) => check_subs(from_subs, to_subs), . (&ty::Array(from_ty, _), &ty::Array(to_ty, _)) | (&ty::Slice(from_ty), &ty::Slice(to_ty)) => { . check_ty(from_ty, to_ty) . }, 80 ( 0.00%) (&ty::Ref(from_region, from_ty, _), &ty::Ref(to_region, to_ty, _)) => { 4 ( 0.00%) check_region(from_region, to_region) || check_ty(from_ty, to_ty) . }, . (&ty::Tuple(from_tys), &ty::Tuple(to_tys)) => { . from_tys.len() != to_tys.len() . || from_tys . .iter() . .zip(to_tys) . .any(|(from_ty, to_ty)| check_ty(from_ty, to_ty)) . }, . _ => from_ty.has_bound_regions(), . } 426 ( 0.00%) } . 66 ( 0.00%) assert_eq!(from_sig.inputs_and_output.len(), to_sig.inputs_and_output.len()); . from_sig . .inputs_and_output . .iter() . .zip(to_sig.inputs_and_output) 66 ( 0.00%) .any(|(from_ty, to_ty)| check_ty(from_ty, to_ty)) 2,346 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/eta_reduction.rs:clippy_lints::eta_reduction::has_late_bound_to_non_late_bound_regions::check_ty (66x) . } . 16 ( 0.00%) fn ty_has_static(ty: Ty<'_>) -> bool { 8 ( 0.00%) ty.walk() 28 ( 0.00%) => ???:::walk (4x) . .any(|arg| matches!(arg.kind(), GenericArgKind::Lifetime(re) if re.is_static())) 12 ( 0.00%) } 13,287 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/range.rs -------------------------------------------------------------------------------- Ir -- line 1092 ---------------------------------------- . . NonZero::new(n - taken).map_or(Ok(()), Err) . } . } . . impl RangeIteratorImpl for ops::Range { . #[inline] . fn spec_next(&mut self) -> Option { 48,393 ( 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 { 17,926 ( 0.00%) if self.start < self.end { . // SAFETY: just checked precondition . self.end = unsafe { Step::backward_unchecked(self.end, 1) }; . Some(self.end) . } else { . None . } . } . -- line 1150 ---------------------------------------- -- line 1523 ---------------------------------------- . } . . #[stable(feature = "inclusive_range", since = "1.26.0")] . impl Iterator for ops::RangeInclusive { . type Item = A; . . #[inline] . fn next(&mut self) -> Option { 2 ( 0.00%) if self.is_empty() { . return None; . } . . let (n, o) = Step::forward_overflowing(self.start.clone(), 1); . . self.exhausted = o; . Some(mem::replace(&mut self.start, n)) . } -- line 1539 ---------------------------------------- 32,634 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/implied_bounds_in_impls.rs -------------------------------------------------------------------------------- Ir -- line 231 ---------------------------------------- . /// . /// For `impl Deref + DerefMut + Eq` this returns `[Deref, PartialEq]`. . /// The `Deref` comes from `DerefMut` because `trait DerefMut: Deref {}`, and `PartialEq` comes from . /// `Eq`. . fn collect_supertrait_bounds<'tcx>(cx: &LateContext<'tcx>, bounds: GenericBounds<'tcx>) -> Vec> { . bounds . .iter() . .filter_map(|bound| { 4 ( 0.00%) if let GenericBound::Trait(poly_trait) = bound . && let TraitBoundModifiers::NONE = poly_trait.modifiers 7 ( 0.00%) && let [.., path] = poly_trait.trait_ref.path.segments . && poly_trait.bound_generic_params.is_empty() . && let Some(trait_def_id) = path.res.opt_def_id() 1 ( 0.00%) && let clauses = cx.tcx.explicit_super_clauses_of(trait_def_id).skip_binder() . // If the trait has no supertrait, there is no need to collect anything from that bound 1 ( 0.00%) && !clauses.is_empty() . { 10 ( 0.00%) Some(ImplTraitBound { . span: bound.span(), . clauses, . trait_def_id, 1 ( 0.00%) args: path.args.map_or([].as_slice(), |p| p.args), . constraints: path.args.map_or([].as_slice(), |p| p.constraints), . }) . } else { 1 ( 0.00%) None . } . }) . .collect() . } . . /// Given a bound in an `impl Trait` type, looks for a trait in the set of supertraits (previously . /// collected in [`collect_supertrait_bounds`]) that matches (same trait and generic arguments). . fn find_bound_in_supertraits<'a, 'tcx>( . cx: &LateContext<'tcx>, . trait_def_id: DefId, . args: &'tcx [GenericArg<'tcx>], . bounds: &'a [ImplTraitBound<'tcx>], . ) -> Option<&'a ImplTraitBound<'tcx>> { . bounds.iter().find(|bound| { 1 ( 0.00%) bound.clauses.iter().any(|(clause, _)| { 4 ( 0.00%) if let ClauseKind::Trait(tr) = clause.kind().skip_binder() 14 ( 0.00%) => ???:::kind (1x) . && tr.def_id() == trait_def_id . { . is_same_generics( . cx.tcx, . tr.trait_ref.args, . bound.args, . args, . bound.trait_def_id, -- line 280 ---------------------------------------- -- line 282 ---------------------------------------- . ) . } else { . false . } . }) . }) . } . 161 ( 0.00%) fn check<'tcx>(cx: &LateContext<'tcx>, bounds: GenericBounds<'tcx>) { 46 ( 0.00%) if bounds.len() == 1 { . // Very often there is only a single bound, e.g. `impl Deref<..>`, in which case . // we can avoid doing a bunch of stuff unnecessarily; there will trivially be . // no duplicate bounds . return; . } . . let supertraits = collect_supertrait_bounds(cx, bounds); . . // Lint all bounds in the `impl Trait` type that we've previously also seen in the set of . // supertraits of each of the bounds. . // This involves some extra logic when generic arguments are present, since . // simply comparing trait `DefId`s won't be enough. We also need to compare the generics. . for (index, bound) in bounds.iter().enumerate() { 2 ( 0.00%) if let GenericBound::Trait(poly_trait) = bound 2 ( 0.00%) && let TraitBoundModifiers::NONE = poly_trait.modifiers 5 ( 0.00%) && let [.., path] = poly_trait.trait_ref.path.segments 3 ( 0.00%) && let implied_args = path.args.map_or([].as_slice(), |a| a.args) . && let implied_constraints = path.args.map_or([].as_slice(), |a| a.constraints) . && let Some(def_id) = poly_trait.trait_ref.path.res.opt_def_id() . && let Some(bound) = find_bound_in_supertraits(cx, def_id, implied_args, &supertraits) . // If the implied bound has a type binding that also exists in the implied-by trait, . // then we shouldn't lint. See #11880 for an example. . && let assocs = cx.tcx.associated_items(bound.trait_def_id) . && !implied_constraints.iter().any(|constraint| { . assocs -- line 316 ---------------------------------------- -- line 317 ---------------------------------------- . .filter_by_name_unhygienic(constraint.ident.name) . .next() . .is_some_and(AssocItem::is_type) . }) . { . emit_lint(cx, poly_trait, bounds, index, implied_constraints, bound); . } . } 184 ( 0.00%) } . . impl<'tcx> LateLintPass<'tcx> for ImpliedBoundsInImpls { . fn check_generics(&mut self, cx: &LateContext<'tcx>, generics: &rustc_hir::Generics<'tcx>) { 4,099 ( 0.00%) for predicate in generics.predicates { 834 ( 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 . { 110 ( 0.00%) check(cx, predicate.bounds); 374 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/implied_bounds_in_impls.rs:clippy_lints::implied_bounds_in_impls::check (22x) . } . } . } . . fn check_ty(&mut self, cx: &LateContext<'tcx>, ty: &rustc_hir::Ty<'tcx, AmbigArg>) { 35,745 ( 0.00%) if let TyKind::OpaqueDef(opaque_ty, ..) = ty.kind { 4 ( 0.00%) check(cx, opaque_ty.bounds); 3,769 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/implied_bounds_in_impls.rs:clippy_lints::implied_bounds_in_impls::check (1x) . } . } . } 5 ( 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 { 20,153 ( 0.00%) fn check_fn(&mut self, cx: &EarlyContext<'_>, kind: FnKind<'_>, _: Span, _: NodeId) { 8,358 ( 0.00%) if let FnKind::Fn(_, _, Fn { generics, .. }) = kind 2,600 ( 0.00%) && !generics.params.is_empty() 158 ( 0.00%) && !generics.where_clause.predicates.is_empty() . { . let mut generic_params_with_bounds = FxHashMap::default(); . . for param in &generics.params { 26 ( 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 { 44 ( 0.00%) match &clause.kind { . WherePredicateKind::BoundPredicate(pred) => { 44 ( 0.00%) if (!pred.bound_generic_params.is_empty() || !pred.bounds.is_empty()) 110 ( 0.00%) && let Some(Some(bound_span)) = pred . .bounded_ty . .span 66 ( 0.00%) .with_source_text(cx, |src| generic_params_with_bounds.get(src)) 9,966 ( 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}> (22x) . { . 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); . } . }, . } . } 20 ( 0.00%) } 23,032 ( 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 ---------------------------------------- 64 ( 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. 259,650 ( 0.01%) pub fn check_clippy_attr(sess: &Session, attr: &A) { 1,991 ( 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"); . }, . } . } 201,950 ( 0.01%) } . . /// 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| { 5,120 ( 0.00%) if let [clippy, segment2] = &*attr.path() . && *clippy == sym::clippy . { . if *segment2 == sym::cyclomatic_complexity { . return false; . } . *segment2 == name . } else { . false . } . }) . } . . /// If `attrs` contain exactly one instance of a built-in Clippy attribute called `name`, . /// returns that attribute, and `None` otherwise 333 ( 0.00%) pub fn get_unique_builtin_attr<'a, A: AttributeExt>(sess: &'a Session, attrs: &'a [A], name: Symbol) -> Option<&'a A> { . let mut unique_attr: Option<&A> = None; . for attr in get_builtin_attr(attrs, name) { . if let Some(duplicate) = unique_attr { . sess.dcx() . .struct_span_err(attr.span(), format!("`{name}` is defined multiple times")) . .with_span_note(duplicate.span(), "first definition found here") . .emit(); . } else { . unique_attr = Some(attr); . } . } . unique_attr 296 ( 0.00%) } . . /// Checks whether `attrs` contain any of `proc_macro`, `proc_macro_derive` or . /// `proc_macro_attribute` . pub fn is_proc_macro(attrs: &[impl AttributeExt]) -> bool { . attrs.iter().any(AttributeExt::is_proc_macro_attr) . } . . /// 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]` 7,512 ( 0.00%) pub fn has_non_exhaustive_attr(tcx: TyCtxt<'_>, adt: AdtDef<'_>) -> bool { 1,878 ( 0.00%) adt.is_variant_list_non_exhaustive() 111,678 ( 0.00%) || find_attr!(tcx, adt.did(), NonExhaustive(..)) 245,607 ( 0.01%) => ???:>::get_attrs (924x) . || adt.variants().iter().any(|variant_def| { 28,038 ( 0.00%) variant_def.is_field_list_non_exhaustive() || find_attr!(tcx, variant_def.def_id, NonExhaustive(..)) 407,870 ( 0.01%) => ???:>::get_attrs (2,200x) . }) . || adt . .all_fields() 5,618 ( 0.00%) .any(|field_def| find_attr!(tcx, field_def.did, NonExhaustive(..))) 240,596 ( 0.01%) => ???:>::get_attrs (2,007x) 7,512 ( 0.00%) } . . /// Checks whether the given span contains a `#[cfg(..)]` attribute 382 ( 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. 159 ( 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 . }) 1,146 ( 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 { 2,269 ( 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; 340,724 ( 0.01%) parse_attrs(sess, attrs, name, |val| stack.push(val)); 2,025,306 ( 0.06%) => site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::parse_attrs::<::push_attrs::{closure#0}, rustc_hir::hir::Attribute> (85,181x) . } . pub fn pop_attrs(&mut self, sess: &Session, attrs: &[impl AttributeExt], name: Symbol) { . let stack = &mut self.stack; 340,724 ( 0.01%) parse_attrs(sess, attrs, name, |val| { 2,007,388 ( 0.06%) => site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::parse_attrs::<::pop_attrs::{closure#0}, rustc_hir::hir::Attribute> (85,181x) . let popped = stack.pop(); . debug_assert_eq!(popped, Some(val)); . }); . } . } . 1,703,620 ( 0.05%) 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,362,896 ( 0.04%) } 86,487 ( 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 897 ---------------------------------------- . /// assert!(!CAPITAL_DELTA_IS_LOWERCASE); . /// ``` . #[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_lowercase(self) -> bool { . match self { 1,479 ( 0.00%) 'a'..='z' => true, 12 ( 0.00%) '\0'..='\u{A9}' => false, . _ => unicode::Lowercase(self), . } . } . . /// Returns `true` if this `char` is in the general category for titlecase letters. . /// Conceptually, these characters consist of an uppercase portion followed by a lowercase portion. . /// . /// Titlecase letters (code points with the general category of `Lt`) are [described] in Chapter 4 -- line 914 ---------------------------------------- -- 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 { 90,300 ( 0.00%) 'A'..='Z' => true, 57,096 ( 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 1017 ---------------------------------------- . /// assert!(!'藏'.is_numeric()); . /// assert!(!'三'.is_numeric()); . /// ``` . #[must_use] . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub fn is_numeric(self) -> bool { . match self { 705 ( 0.00%) '0'..='9' => true, 466 ( 0.00%) '\0'..='\u{B1}' => false, . _ => unicode::N(self), . } . } . . /// Returns `true` if this `char` satisfies either [`is_alphabetic()`] or [`is_numeric()`]. . /// . /// [`is_alphabetic()`]: Self::is_alphabetic . /// [`is_numeric()`]: Self::is_numeric -- line 1034 ---------------------------------------- -- 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,835,982 ( 0.05%) match self { . ' ' | '\x09'..='\x0d' => true, 189,676 ( 0.01%) '\0'..='\u{84}' => false, . _ => unicode::White_Space(self), . } . } . . /// Returns `true` if this `char` has the general category for control codes. . /// . /// Control codes (code points with the general category of `Cc`) are [described] in Chapter 23 . /// (Special Areas and Format Characters) of the Unicode Standard, and [specified] in the Unicode Character -- line 1098 ---------------------------------------- -- line 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 { 375 ( 0.00%) ToLowercase(CaseMappingIter::new(conversions::to_lower(self))) 2,625 ( 0.00%) => ???:core::unicode::unicode_data::conversions::to_lower (125x) . } . . /// 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,809 ( 0.00%) ToUppercase(CaseMappingIter::new(conversions::to_upper(self))) 13,266 ( 0.00%) => ???:core::unicode::unicode_data::conversions::to_upper (603x) . } . . /// 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 2101 ---------------------------------------- . /// assert!(!lf.is_ascii_uppercase()); . /// assert!(!esc.is_ascii_uppercase()); . /// ``` . #[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_uppercase(&self) -> bool { 48 ( 0.00%) matches!(*self, 'A'..='Z') . } . . /// Checks if the value is an ASCII lowercase character: . /// U+0061 'a' ..= U+007A 'z'. . /// . /// # Examples . /// . /// ``` -- line 2117 ---------------------------------------- -- 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 { 32,545 ( 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 { 9,406 ( 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 { 7,855 ( 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 ---------------------------------------- 8,541 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/float_cmp.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_hir::def_id::DefId; . use rustc_hir::{BinOpKind, Expr, ExprKind, UnOp}; . use rustc_lint::LateContext; . use rustc_middle::ty; . use rustc_span::SyntaxContext; . . use super::{FLOAT_CMP, FLOAT_CMP_CONST}; . 559,314 ( 0.02%) 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)) 210 ( 0.00%) && let Some((lhs, rhs, _)) = find_assert_eq_args(cx, e, macro_call.expn) 107,910 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::find_assert_eq_args (42x) 42 ( 0.00%) && is_float(cx, lhs) . { . let ecx = ConstEvalCtxt::new(cx); . let ctxt = macro_call.span.ctxt(); . . let has_const = is_float_const(&ecx, lhs, ctxt) || is_float_const(&ecx, rhs, ctxt); . if !has_const { . return; . } -- line 27 ---------------------------------------- -- 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); . } 497,168 ( 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 { 6,007 ( 0.00%) matches!( 4,048 ( 0.00%) cx.tcx.get_diagnostic_name(def_id), 85,466 ( 0.00%) => ???:::get_diagnostic_name (1,012x) . 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)) . } . 20,280 ( 0.00%) pub(crate) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . op: BinOpKind, . left: &'tcx Expr<'_>, . right: &'tcx Expr<'_>, . ) { 9,057 ( 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 . ); . } . }); . } 13,520 ( 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 { 1,338 ( 0.00%) let value = &cx.typeck_results().expr_ty(expr).peel_refs().kind(); 16,184 ( 0.00%) => ???:::expr_ty (404x) . . if let ty::Array(arr_ty, _) = value { 6 ( 0.00%) return matches!(arr_ty.kind(), ty::Float(_)); . } . . matches!(value, ty::Float(_)) . } . . fn is_array(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . matches!(&cx.typeck_results().expr_ty(expr).peel_refs().kind(), ty::Array(_, _)) . } -- line 183 ---------------------------------------- 1,147 ( 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; . 11,760 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, op: BinOpKind, left: &'tcx Expr<'_>, right: &'tcx Expr<'_>) { 5,040 ( 0.00%) if !matches!(op, BinOpKind::BitAnd | BinOpKind::BitOr | BinOpKind::BitXor) { . return; . } . 308 ( 0.00%) for expr in [left, right] { . check_expr(cx, expr); . } 13,440 ( 0.00%) } . . fn check_expr(cx: &LateContext<'_>, expr: &Expr<'_>) { 936 ( 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) => { 32 ( 0.00%) if let LitKind::Int(Pu128(val), _) = lit.node 20 ( 0.00%) && !is_single_digit(val) 3 ( 0.00%) && !is_power_of_twoish(val) 14 ( 0.00%) && let Some(src) = lit.span.get_text(cx) 14 ( 0.00%) && let Some(num_lit) = NumericLiteral::from_lit_kind(&src, &lit.node) 314 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::from_lit_kind (2x) 50 ( 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 (2x) . && num_lit.is_decimal() . { . emit_lint(cx, lit.span, num_lit.suffix, val); . } . }, . _ => (), . } . } . . 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 { 24 ( 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 ---------------------------------------- 593 ( 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; . 222,896 ( 0.01%) pub(super) fn check(cx: &EarlyContext<'_>, attr: &Attribute, msrv: &MsrvStack) { . // check cfg_attr . if attr.has_name(sym::cfg_attr) 1,146 ( 0.00%) && let Some(items) = attr.meta_item_list() 245,932 ( 0.01%) => ???:::meta_item_list (191x) 382 ( 0.00%) && items.len() == 2 . && let Some(feature_item) = items[0].meta_item() . { . // check for `rustfmt` 955 ( 0.00%) if feature_item.has_name(sym::rustfmt) 1,528 ( 0.00%) => ???:::has_name (191x) . && msrv.meets(msrvs::TOOL_ATTRIBUTES) . // check for `rustfmt_skip` and `rustfmt::skip` . && let Some(skip_item) = &items[1].meta_item() . && (skip_item.has_name(sym::rustfmt_skip) . || skip_item . .path . .segments . .last() -- line 25 ---------------------------------------- -- line 36 ---------------------------------------- . DEPRECATED_CFG_ATTR, . attr.span, . "`cfg_attr` is deprecated for rustfmt and got replaced by tool attributes", . "use", . "#[rustfmt::skip]".to_string(), . Applicability::MachineApplicable, . ); . } else { 573 ( 0.00%) check_deprecated_cfg_recursively(cx, feature_item); 10,071 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check_deprecated_cfg_recursively (191x) 573 ( 0.00%) if let Some(behind_cfg_attr) = items[1].meta_item() { 764 ( 0.00%) unnecessary_clippy_cfg::check(cx, feature_item, behind_cfg_attr, attr); 6,112 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/unnecessary_clippy_cfg.rs:clippy_lints::attrs::unnecessary_clippy_cfg::check (191x) . } . } . } 167,172 ( 0.00%) } . 222,896 ( 0.01%) pub(super) fn check_clippy(cx: &EarlyContext<'_>, attr: &Attribute) { . if attr.has_name(sym::cfg) 3,216 ( 0.00%) && let Some(list) = attr.meta_item_list() 391,154 ( 0.01%) => ???:::meta_item_list (536x) . { 2,144 ( 0.00%) for item in list.iter().filter_map(|item| item.meta_item()) { 1,608 ( 0.00%) check_deprecated_cfg_recursively(cx, item); 37,731 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check_deprecated_cfg_recursively (536x) . } . } 195,034 ( 0.01%) } . 6,797 ( 0.00%) fn check_deprecated_cfg_recursively(cx: &EarlyContext<'_>, attr: &rustc_ast::MetaItem) { 7,518 ( 0.00%) if let Some(ident) = attr.ident() { 6,543 ( 0.00%) => ???:::ident (727x) . if matches!(ident.name, sym::any | sym::all | sym::not) { 712 ( 0.00%) let Some(list) = attr.meta_item_list() else { return }; 948 ( 0.00%) => ???:::meta_item_list (158x) 778 ( 0.00%) for item in list.iter().filter_map(|item| item.meta_item()) { 732 ( 0.00%) check_deprecated_cfg_recursively(cx, item); 11,786 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check_deprecated_cfg_recursively'2 (206x) . } . } else { . check_cargo_clippy_attr(cx, attr); . } . } 4,855 ( 0.00%) } . . fn check_cargo_clippy_attr(cx: &EarlyContext<'_>, item: &rustc_ast::MetaItem) { 3,965 ( 0.00%) if item.has_name(sym::feature) && item.value_str() == Some(sym::cargo_clippy) { 4,552 ( 0.00%) => ???:::has_name (569x) . 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 ---------------------------------------- 1,685 ( 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. 20,166 ( 0.00%) __rust_no_alloc_shim_is_unstable_v2(); 6 ( 0.00%) => ???:std::exception::~exception() (6x) . 275,065 ( 0.01%) __rust_alloc(layout.size(), layout.alignment()) 29,905 ( 0.00%) => ???:__rustc::__rust_alloc (854x) . } . } . . /// 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) { 262,910 ( 0.01%) unsafe { __rust_dealloc(ptr, layout.size(), layout.alignment()) } 380 ( 0.00%) => ???:__rustc::__rdl_dealloc (10x) . } . . /// 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 { 25,681 ( 0.00%) unsafe { __rust_realloc(ptr, layout.size(), layout.alignment(), new_size) } 1,320,051 ( 0.04%) => ???:__rustc::__rust_realloc (4,705x) . } . . /// Allocates zero-initialized memory with the global allocator. . /// . /// This function forwards calls to the [`GlobalAlloc::alloc_zeroed`] method . /// of the allocator registered with the `#[global_allocator]` attribute . /// if there is one, or the `std` crate’s default. . /// -- line 230 ---------------------------------------- -- line 276 ---------------------------------------- . #[inline] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . pub unsafe fn alloc_zeroed(layout: Layout) -> *mut u8 { . unsafe { . // Make sure we don't accidentally allow omitting the allocator shim in . // stable code until it is actually stabilized. . __rust_no_alloc_shim_is_unstable_v2(); . 460 ( 0.00%) __rust_alloc_zeroed(layout.size(), layout.alignment()) 10,494 ( 0.00%) => ???:__rustc::__rust_alloc_zeroed (115x) . } . } . . 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> { 34,362 ( 0.00%) match layout.size() { . 0 => Ok(layout.dangling_ptr().cast_slice(0)), . // SAFETY: `layout` is non-zero in size, . size => unsafe { 17,188 ( 0.00%) let raw_ptr = if zeroed { alloc_zeroed(layout) } else { alloc(layout) }; 4 ( 0.00%) => ???:std::exception::~exception() (4x) . let ptr = NonNull::new(raw_ptr).ok_or(AllocError)?; . Ok(ptr.cast_slice(size)) . }, . } . } . . #[inline] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . fn deallocate_impl_runtime(ptr: NonNull, layout: Layout) { 25,540 ( 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 ---------------------------------------- 142,077 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_ifs.rs -------------------------------------------------------------------------------- Ir -- line 32 ---------------------------------------- . pub NEEDLESS_IFS, . complexity, . "checks for empty if branches" . } . . declare_lint_pass!(NeedlessIfs => [NEEDLESS_IFS]); . . impl LateLintPass<'_> for NeedlessIfs { 40,040 ( 0.00%) fn check_stmt<'tcx>(&mut self, cx: &LateContext<'tcx>, stmt: &Stmt<'tcx>) { 12,509 ( 0.00%) if let StmtKind::Expr(expr) = stmt.kind . && let Some(If { . cond, . then, . r#else: None, . }) = If::hir(expr) 1,575 ( 0.00%) && let ExprKind::Block(block, ..) = then.kind 525 ( 0.00%) && block.stmts.is_empty() 38 ( 0.00%) && block.expr.is_none() 4 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) 117 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:::in_external_macro (1x) 1 ( 0.00%) && then.span.check_text(cx, |src| { . // Ignore . // - empty macro expansions . // - empty reptitions in macro expansions . // - comments . // - #[cfg]'d out code . src.bytes() 35 ( 0.00%) .all(|ch| matches!(ch, b'{' | b'}') || ch.is_ascii_whitespace() || ch == b'\x0b') . }) . && let Some(cond_span) = walk_span_to_context(cond.span, expr.span.ctxt()) . && let Some(cond_snippet) = cond_span.get_text(cx) . && !is_from_proc_macro(cx, expr) . { . span_lint_and_sugg( . cx, . NEEDLESS_IFS, -- line 66 ---------------------------------------- -- line 76 ---------------------------------------- . format!("{cond_snippet};") . } . } else { . String::new() . }, . Applicability::MachineApplicable, . ); . } 45,760 ( 0.00%) } . } 1 ( 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) { 102,409 ( 0.00%) if let ExprKind::If(_, then_block, Some(else_clause)) = &expr.kind 562 ( 0.00%) && let ExprKind::Block(block, _) = &else_clause.kind 352 ( 0.00%) && !expr.span.from_expansion() 350 ( 0.00%) && !else_clause.span.from_expansion() 350 ( 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, . ); . } 49,448 ( 0.00%) } . } 3,934 ( 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 { 22,568 ( 0.00%) fn check_fn( . &mut self, . cx: &LateContext<'tcx>, . k: FnKind<'tcx>, . decl: &'tcx FnDecl<'_>, . body: &'tcx Body<'_>, . _: Span, . _: LocalDefId, . ) { 5,642 ( 0.00%) if !matches!(k, FnKind::Closure) { . for arg in iter_input_pats(decl, body) { 20,756 ( 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", . ); . } . } . } 22,568 ( 0.00%) } . 45,760 ( 0.00%) fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { 13,506 ( 0.00%) if let StmtKind::Let(local) = stmt.kind 9,862 ( 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, . ); . }, . ); . } 45,760 ( 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; . }; . 2,975 ( 0.00%) let lhs_bounds = numeric_cast_precast_bounds(cx, normalized_lhs); 11,900 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/invalid_upcast_comparisons.rs:clippy_lints::operators::invalid_upcast_comparisons::numeric_cast_precast_bounds (595x) 1,785 ( 0.00%) let rhs_bounds = numeric_cast_precast_bounds(cx, normalized_rhs); 11,900 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/invalid_upcast_comparisons.rs:clippy_lints::operators::invalid_upcast_comparisons::numeric_cast_precast_bounds (595x) . 5,355 ( 0.00%) upcast_comparison_bounds_err(cx, span, rel, lhs_bounds, normalized_lhs, normalized_rhs, false); 10,710 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/invalid_upcast_comparisons.rs:clippy_lints::operators::invalid_upcast_comparisons::upcast_comparison_bounds_err (595x) 4,760 ( 0.00%) upcast_comparison_bounds_err(cx, span, rel, rhs_bounds, normalized_rhs, normalized_lhs, true); 10,710 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/invalid_upcast_comparisons.rs:clippy_lints::operators::invalid_upcast_comparisons::upcast_comparison_bounds_err (595x) . } . 9,520 ( 0.00%) fn numeric_cast_precast_bounds(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option<(FullInt, FullInt)> { 2,380 ( 0.00%) if let ExprKind::Cast(cast_exp, _) = expr.kind { . let pre_cast_ty = cx.typeck_results().expr_ty(cast_exp); . let cast_ty = cx.typeck_results().expr_ty(expr); . // if it's a cast from i32 to u32 wrapping will invalidate all these checks . if cx.layout_of(pre_cast_ty).ok().map(|l| l.size) == cx.layout_of(cast_ty).ok().map(|l| l.size) { . return None; . } . match pre_cast_ty.kind() { . ty::Int(int_ty) => Some(match int_ty { -- line 44 ---------------------------------------- -- 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 . } 9,520 ( 0.00%) } . 7,140 ( 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, . ) { 5,950 ( 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); . } . }, . } . } 8,330 ( 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 ---------------------------------------- 2,380 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/fuse.rs -------------------------------------------------------------------------------- Ir -- line 18 ---------------------------------------- . pub struct Fuse { . // NOTE: for `I: FusedIterator`, we never bother setting `None`, but . // we still have to be prepared for that state due to variance. . // See rust-lang/rust#85863 . iter: Option, . } . impl Fuse { . pub(in crate::iter) const fn new(iter: I) -> Fuse { 152 ( 0.00%) Fuse { iter: Some(iter) } . } . . pub(crate) fn into_inner(self) -> Option { . self.iter . } . } . . #[stable(feature = "fused", since = "1.26.0")] -- line 34 ---------------------------------------- -- line 73 ---------------------------------------- . match self.iter { . Some(iter) => iter.count(), . None => 0, . } . } . . #[inline] . fn size_hint(&self) -> (usize, Option) { 20 ( 0.00%) match self.iter { . Some(ref iter) => iter.size_hint(), . None => (0, Some(0)), . } . } . . #[inline] . fn try_fold(&mut self, acc: Acc, fold: Fold) -> R . where -- line 89 ---------------------------------------- -- 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, . { 12,315 ( 0.00%) if let Some(iter) = self.iter { 9 ( 0.00%) acc = iter.fold(acc, fold); 186 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:, clippy_lints::write::with_newline::check::{closure#0}::{closure#0}>, clippy_lints::write::with_newline::check::{closure#0}::{closure#1}> as core::iter::traits::iterator::Iterator>::fold::>::iter_fold::flatten as core::iter::traits::iterator::Iterator>::fold::flatten as core::iter::traits::iterator::Iterator>::count::to_usize::{closure#0}, ::sum, clippy_lints::write::with_newline::check::{closure#0}::{closure#0}>, core::str::iter::Chars, clippy_lints::write::with_newline::check::{closure#0}::{closure#1}>, as core::iter::traits::iterator::Iterator>::count::to_usize::{closure#0}>>::{closure#0}>::{closure#0}>::{closure#0}>::{closure#0}> (2x) . } . acc . } . . #[inline] . fn find

(&mut self, predicate: P) -> Option . where . P: FnMut(&Self::Item) -> bool, -- line 111 ---------------------------------------- -- line 395 ---------------------------------------- . /// However, we must still be prepared for the possibility that it was already cleared! . #[doc(hidden)] . impl FuseImpl for Fuse . where . I: FusedIterator, . { . #[inline] . fn next(&mut self) -> Option<::Item> { 6,301 ( 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, . { 124,499 ( 0.00%) if let Some(ref mut iter) = self.iter { 62,479 ( 0.00%) acc = iter.try_fold(acc, fold)?; 906 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/map.rs:, clippy_lints::len_without_is_empty::check_for_is_empty::{closure#0}> as core::iter::traits::iterator::Iterator>::try_fold::<(), >::iter_try_fold::flatten, , rustc_middle::ty::assoc::AssocItem>>::get_by_key_enumerated::{closure#1}>, , rustc_middle::ty::assoc::AssocItem>>::get_by_key::{closure#0}>, (), core::ops::control_flow::ControlFlow<&rustc_middle::ty::assoc::AssocItem>, as core::iter::traits::iterator::Iterator>::try_fold::flatten, , rustc_middle::ty::assoc::AssocItem>>::get_by_key_enumerated::{closure#1}>, , rustc_middle::ty::assoc::AssocItem>>::get_by_key::{closure#0}>, (), core::ops::control_flow::ControlFlow<&rustc_middle::ty::assoc::AssocItem>, core::iter::traits::iterator::Iterator::find::check<&rustc_middle::ty::assoc::AssocItem, clippy_lints::len_without_is_empty::check_for_is_empty::{closure#1}>::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow<&rustc_middle::ty::assoc::AssocItem>> (4x) . } . try { acc } . } . . #[inline] . fn find

(&mut self, predicate: P) -> Option . where . P: FnMut(&Self::Item) -> bool, -- line 438 ---------------------------------------- 447 ( 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 { 621,460 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // Loosened from `root_macro_call_first_node` so the lint also fires when `format!` is . // the tail of a block emitted by another macro. The `!= macro_call.expn` check filters . // HIR nodes inside `format!`'s own expansion (its outer block's tail, its nested . // `format_args!`), which would otherwise also pass `first_node_in_macro` and cause the . // lint to fire multiple times per call. 310,901 ( 0.01%) if let Some(macro_call) = matching_root_macro_call(cx, expr.span, sym::format_macro) 10,675,535 ( 0.29%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::matching_root_macro_call (62,146x) 177 ( 0.00%) && first_node_in_macro(cx, expr).is_some_and(|p_expn| p_expn != macro_call.expn) 2,508 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::first_node_in_macro:: (57x) 24 ( 0.00%) && let Some(format_args) = self.format_args.get(cx, expr, macro_call.expn) 9,126 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:::get (3x) . { 3 ( 0.00%) let mut applicability = Applicability::MachineApplicable; . let call_site = macro_call.span; . . match (format_args.arguments.all_args(), &format_args.template[..]) { 6 ( 0.00%) ([], []) => span_useless_format_empty(cx, call_site, "String::new()".to_owned(), applicability), . ([], [_]) => { . // Simulate macro expansion, converting {{ and }} to { and }. . let Some(snippet) = format_args.span.get_text(cx) else { . return; . }; . let s_expand = snippet.replace("{{", "{").replace("}}", "}"); . let sugg = format!("{s_expand}.to_string()"); . span_useless_format(cx, call_site, sugg, applicability); . }, 6 ( 0.00%) ([arg], [piece]) => { 12 ( 0.00%) if let Some(value) = find_format_arg_expr(expr, arg) 3,861 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::find_format_arg_expr (3x) 6 ( 0.00%) && let FormatArgsPiece::Placeholder(placeholder) = piece 3 ( 0.00%) && placeholder.format_trait == FormatTrait::Display . && placeholder.format_options == FormatOptions::default() . && match cx.typeck_results().expr_ty(value).peel_refs().kind() { . ty::Adt(adt, _) => Some(adt.did()) == cx.tcx.lang_items().string(), . ty::Str => true, . _ => false, . } . { . let is_new_string = match value.kind { -- line 90 ---------------------------------------- -- line 101 ---------------------------------------- . format!("{}.to_string()", sugg.maybe_paren()) . }; . span_useless_format(cx, call_site, sugg, applicability); . } . }, . _ => {}, . } . } 497,168 ( 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 ---------------------------------------- 62,152 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/ifs/ifs_same_cond.rs -------------------------------------------------------------------------------- Ir -- line 8 ---------------------------------------- . . use super::IFS_SAME_COND; . . fn method_caller_is_mutable<'tcx>( . cx: &LateContext<'tcx>, . caller_expr: &Expr<'_>, . interior_mut: &mut InteriorMut<'tcx>, . ) -> bool { 60 ( 0.00%) let caller_ty = cx.typeck_results().expr_ty(caller_expr); 480 ( 0.00%) => ???:::expr_ty (12x) . 60 ( 0.00%) interior_mut.is_interior_mut_ty(cx, caller_ty) 27,755 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:::is_interior_mut_ty (12x) 22 ( 0.00%) || caller_ty.is_mutable_ptr() . // `find_binding_init` will return the binding iff its not mutable . || caller_expr.res_local_id() 6 ( 0.00%) .and_then(|hid| find_binding_init(cx, hid)) 1,224 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::find_binding_init (6x) . .is_none() . } . . /// Implementation of `IFS_SAME_COND`. 9,100 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, conds: &[&Expr<'_>], interior_mut: &mut InteriorMut<'tcx>) { 8,190 ( 0.00%) for group in search_same( 284,630 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::search_same::<&rustc_hir::hir::Expr, clippy_lints::ifs::ifs_same_cond::check::{closure#0}, clippy_lints::ifs::ifs_same_cond::check::{closure#1}> (910x) . conds, 158 ( 0.00%) |e| hash_expr(cx, e), 72,944 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::hash_expr (79x) . |lhs, rhs| { . // Ignore eq_expr side effects iff one of the expression kind is a method call . // and the caller is not a mutable, including inner mutable type. 116 ( 0.00%) if let ExprKind::MethodCall(_, caller, _, _) = lhs.kind { 6 ( 0.00%) if method_caller_is_mutable(cx, caller, interior_mut) { . false . } else { . SpanlessEq::new(cx).eq_expr(SyntaxContext::root(), lhs, rhs) . } . } else { 184 ( 0.00%) eq_expr_value(cx, SyntaxContext::root(), lhs, rhs) 106,362 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_expr_value (46x) . } . }, . ) { . let spans: Vec<_> = group.into_iter().map(|expr| expr.span).collect(); . span_lint(cx, IFS_SAME_COND, spans, "these `if` branches have the same condition"); . } 7,280 ( 0.00%) } 24 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/extra_unused_type_parameters.rs -------------------------------------------------------------------------------- Ir -- line 66 ---------------------------------------- . /// Collection of any type parameters with trait bounds that appear in a where clause. . where_bounds: FxHashSet, . /// The entire `Generics` object of the function, useful for querying purposes. . generics: &'tcx Generics<'tcx>, . } . . impl<'cx, 'tcx> TypeWalker<'cx, 'tcx> { . fn new(cx: &'cx LateContext<'tcx>, generics: &'tcx Generics<'tcx>) -> Self { 1,496 ( 0.00%) let ty_params = generics . .params . .iter() 3,472 ( 0.00%) .filter_map(|param| match param.kind { 140 ( 0.00%) GenericParamKind::Type { synthetic, .. } if !synthetic => Some((param.def_id.into(), param.span)), . _ => None, . }) . .collect(); . 7,376 ( 0.00%) Self { . cx, . ty_params, . inline_bounds: FxHashMap::default(), . where_bounds: FxHashSet::default(), . generics, . } . } . -- line 91 ---------------------------------------- -- line 101 ---------------------------------------- . . fn emit_sugg(&self, spans: Vec, msg: String, help: &'static str) { . let suggestions: Vec<(Span, String)> = spans.iter().copied().zip(std::iter::repeat(String::new())).collect(); . span_lint_and_then(self.cx, EXTRA_UNUSED_TYPE_PARAMETERS, spans, msg, |diag| { . diag.multipart_suggestion(help, suggestions, Applicability::MaybeIncorrect); . }); . } . 5,984 ( 0.00%) fn emit_lint(&self) { 2,244 ( 0.00%) let explicit_params = self . .generics . .params . .iter() . .filter(|param| !param.is_elided_lifetime() && !param.is_impl_trait()) . .collect::>(); . . let extra_params = explicit_params . .iter() . .enumerate() . .filter(|(_, param)| self.ty_params.contains_key(¶m.def_id.to_def_id())) . .collect::>(); . 1,496 ( 0.00%) let (msg, help) = match extra_params.len() { . 0 => return, . 1 => ( . format!( . "type parameter `{}` goes unused in function definition", . extra_params[0].1.name.ident() . ), . "consider removing the parameter", . ), -- line 131 ---------------------------------------- -- line 183 ---------------------------------------- . let prev_span = self.get_bound_span(prev); . self.get_bound_span(param).with_lo(prev_span.hi()) . } . }) . .collect() . }; . self.emit_sugg(spans, msg, help); . } 5,984 ( 0.00%) } . } . . /// Given a generic bound, if the bound is for a trait that's not a `LangItem`, return the . /// `LocalDefId` for that trait. . fn bound_to_trait_def_id(bound: &GenericBound<'_>) -> Option { 178 ( 0.00%) bound.trait_ref()?.trait_def_id()?.as_local() 1,157 ( 0.00%) => ???:::trait_def_id (89x) . } . . impl<'tcx> Visitor<'tcx> for TypeWalker<'_, 'tcx> { . type NestedFilter = nested_filter::OnlyBodies; . 2 ( 0.00%) fn visit_ty(&mut self, t: &'tcx Ty<'tcx, AmbigArg>) { 333 ( 0.00%) if let Some((def_id, _)) = t.peel_refs().as_generic_param() { . self.ty_params.remove(&def_id); . } else { 13,518 ( 0.00%) walk_ty(self, t); 223 ( 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:: (1x) . } . } . 539 ( 0.00%) fn visit_where_predicate(&mut self, predicate: &'tcx WherePredicate<'tcx>) { . let span = predicate.span; 308 ( 0.00%) if let WherePredicateKind::BoundPredicate(predicate) = predicate.kind { . // Collect spans for any bounds on type parameters. 385 ( 0.00%) if let Some((def_id, _)) = predicate.bounded_ty.peel_refs().as_generic_param() { 284 ( 0.00%) match predicate.origin { . PredicateOrigin::GenericParam => { . self.inline_bounds.insert(def_id, span); . }, . PredicateOrigin::WhereClause => { . self.where_bounds.insert(def_id); . }, . PredicateOrigin::ImplTrait => (), . } . . // If the bound contains non-public traits, err on the safe side and don't lint the . // corresponding parameter. 77 ( 0.00%) if !predicate . .bounds . .iter() . .filter_map(bound_to_trait_def_id) 259 ( 0.00%) .all(|id| self.cx.effective_visibilities.is_exported(id)) 1,995 ( 0.00%) => ???:::is_exported (35x) . { . self.ty_params.remove(&def_id); . } . } else { . // If the bounded type isn't a generic param, but is instead a concrete generic . // type, any params we find nested inside of it are being used as concrete types, . // and can therefore can be considered used. So, we're fine to walk the left-hand . // side of the where bound. . walk_unambig_ty(self, predicate.bounded_ty); . } 77 ( 0.00%) for bound in predicate.bounds { . walk_param_bound(self, bound); . } . } 616 ( 0.00%) } . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { 924 ( 0.00%) self.cx.tcx . } . } . . fn is_empty_body(cx: &LateContext<'_>, body: BodyId) -> bool { 11,541 ( 0.00%) matches!(cx.tcx.hir_body(body).value.kind, ExprKind::Block(b, _) if b.stmts.is_empty() && b.expr.is_none()) 77,195 ( 0.00%) => ???:::hir_body (1,196x) . } . . impl<'tcx> LateLintPass<'tcx> for ExtraUnusedTypeParameters { 18,004 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 5,144 ( 0.00%) if let ItemKind::Fn { 128 ( 0.00%) generics, 222 ( 0.00%) body: body_id, . .. . } = item.kind 128 ( 0.00%) && !generics.params.is_empty() 132 ( 0.00%) && !is_empty_body(cx, body_id) 777 ( 0.00%) && (!self.avoid_breaking_exported_api || !cx.effective_visibilities.is_exported(item.owner_id.def_id)) 5,757 ( 0.00%) => ???:::is_exported (111x) 312 ( 0.00%) && !item.span.in_external_macro(cx.sess().source_map()) 208 ( 0.00%) && !is_from_proc_macro(cx, item) . { . let mut walker = TypeWalker::new(cx, generics); 208 ( 0.00%) walk_item(&mut walker, item); 572,865 ( 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_item:: (104x) 104 ( 0.00%) walker.emit_lint(); 14,747 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/extra_unused_type_parameters.rs:::emit_lint (104x) . } 20,576 ( 0.00%) } . 17,521 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'tcx>) { . // Only lint on inherent methods, not trait methods. 5,006 ( 0.00%) if let ImplItemKind::Fn(.., body_id) = item.kind 4,804 ( 0.00%) && !item.generics.params.is_empty() 9,920 ( 0.00%) && trait_ref_of_method(cx, item.owner_id).is_none() 296,013 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::trait_ref_of_method (1,984x) 1,908 ( 0.00%) && !is_empty_body(cx, body_id) 8,372 ( 0.00%) && (!self.avoid_breaking_exported_api || !cx.effective_visibilities.is_exported(item.owner_id.def_id)) 62,667 ( 0.00%) => ???:::is_exported (1,196x) 1,932 ( 0.00%) && !item.span.in_external_macro(cx.sess().source_map()) 1,288 ( 0.00%) && !is_from_proc_macro(cx, item) . { . let mut walker = TypeWalker::new(cx, item.generics); 1,288 ( 0.00%) walk_impl_item(&mut walker, item); 1,632,394 ( 0.04%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_impl_item:: (644x) 644 ( 0.00%) walker.emit_lint(); 71,660 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/extra_unused_type_parameters.rs:::emit_lint (644x) . } 20,024 ( 0.00%) } . } 20,832 ( 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, &[])) . } . 4,018 ( 0.00%) if let StmtKind::Let(LetStmt { . pat, . init: Some(init_expr), . els: Some(els), . .. 8,146 ( 0.00%) }) = stmt.kind . && init_expr_can_use_question_mark(cx, init_expr) . && let Some(ret) = find_let_else_ret_expression(els) . && let Some(inner_pat) = pat_and_expr_can_be_question_mark(cx, pat, ret) . && !span_contains_comment(cx, els.span) . && !span_contains_cfg(cx, els.span) . { . let mut applicability = Applicability::MaybeIncorrect; . let init_expr_str = -- line 151 ---------------------------------------- -- line 198 ---------------------------------------- . "this `let...else` may be rewritten with the `?` operator", . "replace it with", . sugg, . applicability, . ); . } . } . 4,328 ( 0.00%) fn is_early_return(smbl: Symbol, cx: &LateContext<'_>, if_block: &IfBlockType<'_>) -> bool { 1,623 ( 0.00%) match *if_block { 344 ( 0.00%) IfBlockType::IfIs(caller, caller_ty, call_sym, if_then) => { . // If the block could be identified as `if x.is_none()/is_err()`, . // we then only need to check the if_then return to see if it is none/err. 448 ( 0.00%) caller_ty.is_diag_item(cx, smbl) 152 ( 0.00%) && expr_return_none_or_err(smbl, cx, if_then, caller, None) 818 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::expr_return_none_or_err (19x) . && match smbl { . sym::Option => call_sym == sym::is_none, . sym::Result => call_sym == sym::is_err, . _ => false, . } . }, 197 ( 0.00%) IfBlockType::IfLet(res, let_expr_ty, let_pat_sym, let_expr, if_then, if_else) => { 394 ( 0.00%) let_expr_ty.is_diag_item(cx, smbl) . && match smbl { 392 ( 0.00%) sym::Option => { . // We only need to check `if let Some(x) = option` not `if let None = option`, . // because the later one will be suggested as `if option.is_none()` thus causing conflict. 221 ( 0.00%) res.ctor_parent(cx).is_lang_item(cx, OptionSome) 186 ( 0.00%) && if_else.is_some_and(|inner| expr_return_none_or_err(smbl, cx, inner, let_expr, None)) 1,251 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::expr_return_none_or_err (31x) . }, . sym::Result => { 2 ( 0.00%) (res.ctor_parent(cx).is_lang_item(cx, ResultOk) . && if_else.is_some_and(|inner| { . expr_return_none_or_err(smbl, cx, inner, let_expr, Some(let_pat_sym)) . })) 6 ( 0.00%) || res.ctor_parent(cx).is_lang_item(cx, ResultErr) 22 ( 0.00%) && expr_return_none_or_err(smbl, cx, if_then, let_expr, Some(let_pat_sym)) 102 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::expr_return_none_or_err (2x) . && if_else.is_none() . }, . _ => false, . } . }, . } 4,328 ( 0.00%) } . 208 ( 0.00%) fn expr_return_none_or_err( . smbl: Symbol, . cx: &LateContext<'_>, . expr: &Expr<'_>, . cond_expr: &Expr<'_>, . err_sym: Option, . ) -> bool { 361 ( 0.00%) match peel_blocks_with_stmt(expr).kind { . ExprKind::Ret(Some(ret_expr)) => expr_return_none_or_err(smbl, cx, ret_expr, cond_expr, err_sym), 1 ( 0.00%) ExprKind::Path(ref qpath) => match smbl { 2 ( 0.00%) sym::Option => cx 6 ( 0.00%) .qpath_res(qpath, expr.hir_id) 23 ( 0.00%) => ???:::qpath_res (1x) 1 ( 0.00%) .ctor_parent(cx) . .is_lang_item(cx, OptionNone), . sym::Result => expr.res_local_id().is_some() && expr.res_local_id() == cond_expr.res_local_id(), . _ => false, . }, 21 ( 0.00%) ExprKind::Call(call_expr, [arg]) => { 8 ( 0.00%) if smbl == sym::Result 4 ( 0.00%) && let ExprKind::Path(QPath::Resolved(_, path)) = &call_expr.kind 1 ( 0.00%) && let Some(segment) = path.segments.first() . && let Some(err_sym) = err_sym 2 ( 0.00%) && let ExprKind::Path(QPath::Resolved(_, arg_path)) = &arg.kind . && let Some(PathSegment { ident, .. }) = arg_path.segments.first() . { . return segment.ident.name == sym::Err && err_sym == ident.name; . } . false . }, . _ => false, . } 260 ( 0.00%) } . . /// Checks if the given expression on the given context matches the following structure: . /// . /// ```ignore . /// if option.is_none() { . /// return None; . /// } . /// ``` -- line 282 ---------------------------------------- -- line 285 ---------------------------------------- . /// if result.is_err() { . /// return result; . /// } . /// ``` . /// . /// If it matches, it will suggest to use the `?` operator instead . fn check_is_none_or_err_and_early_return<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { . if let Some(higher::If { cond, then, r#else }) = higher::If::hir(expr) 6,642 ( 0.00%) && !is_else_clause(cx.tcx, expr) 181,387 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_else_clause (1,107x) 2,570 ( 0.00%) && let ExprKind::MethodCall(segment, caller, [], _) = &cond.kind 344 ( 0.00%) && let caller_ty = cx.typeck_results().expr_ty(caller) 6,880 ( 0.00%) => ???:::expr_ty (172x) 1,720 ( 0.00%) && let if_block = IfBlockType::IfIs(caller, caller_ty, segment.ident.name, then) 1,720 ( 0.00%) && (is_early_return(sym::Option, cx, &if_block) || is_early_return(sym::Result, cx, &if_block)) 25,751 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::is_early_return (344x) . { . let mut applicability = Applicability::MachineApplicable; . let receiver_str = snippet_with_context(cx, caller.span, expr.span.ctxt(), "..", &mut applicability).0; . let by_ref = !cx.type_is_copy_modulo_regions(caller_ty) . && !matches!(caller.kind, ExprKind::Call(..) | ExprKind::MethodCall(..)); . let sugg = if let Some(else_inner) = r#else { . if eq_expr_value(cx, expr.span.ctxt(), caller, peel_blocks(else_inner)) { . format!("Some({receiver_str}?)") -- line 305 ---------------------------------------- -- line 324 ---------------------------------------- . . #[derive(Clone, Copy, Debug)] . enum TryMode { . Result, . Option, . } . . fn find_try_mode<'tcx>(cx: &LateContext<'tcx>, scrutinee: &Expr<'tcx>) -> Option { 537 ( 0.00%) let scrutinee_ty = cx.typeck_results().expr_ty_adjusted(scrutinee).peel_refs(); 12,723 ( 0.00%) => ???:::expr_ty_adjusted (179x) . let ty::Adt(scrutinee_adt_def, _) = scrutinee_ty.kind() else { . return None; . }; . 534 ( 0.00%) match cx.tcx.get_diagnostic_name(scrutinee_adt_def.did())? { 14,432 ( 0.00%) => ???:::get_diagnostic_name (178x) 945 ( 0.00%) sym::Result => Some(TryMode::Result), . sym::Option => Some(TryMode::Option), . _ => None, . } . } . . // Check that `pat` is `{ctor_lang_item}(val)`, returning `val`. 86 ( 0.00%) fn extract_ctor_call<'a, 'tcx>( . cx: &LateContext<'tcx>, . expected_ctor: LangItem, . pat: &'a Pat<'tcx>, . ) -> Option<&'a Pat<'tcx>> { 516 ( 0.00%) if let PatKind::TupleStruct(variant_path, [val_binding], _) = &pat.kind 172 ( 0.00%) && cx 516 ( 0.00%) .qpath_res(variant_path, pat.hir_id) 1,978 ( 0.00%) => ???:::qpath_res (86x) 86 ( 0.00%) .ctor_parent(cx) . .is_lang_item(cx, expected_ctor) . { . Some(val_binding) . } else { . None . } 86 ( 0.00%) } . . // Extracts the local ID of a plain `val` pattern. . fn extract_binding_pat(pat: &Pat<'_>) -> Option { 156 ( 0.00%) if let PatKind::Binding(_, binding, _, None) = pat.kind { . Some(binding) . } else { . None . } . } . . fn check_arm_is_some_or_ok<'tcx>( . cx: &LateContext<'tcx>, -- line 372 ---------------------------------------- -- line 374 ---------------------------------------- . arm: &Arm<'tcx>, . ) -> Option> { . let happy_ctor = match mode { . TryMode::Result => ResultOk, . TryMode::Option => OptionSome, . }; . . // Check for `Ok(val)` or `Some(val)` 2 ( 0.00%) if arm.guard.is_none() 18 ( 0.00%) && let Some(val_binding) = extract_ctor_call(cx, happy_ctor, arm.pat) 434 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::extract_ctor_call (2x) . // Extract out `val` . && let Some(binding) = extract_binding_pat(val_binding) . { . // Check body is just `=> val` 3 ( 0.00%) return Some(if peel_blocks(arm.body).res_local_id() == Some(binding) { . IfLetOrMatchThen::DirectReturn . } else { . IfLetOrMatchThen::ManualUnwrap(val_binding.span, arm.body) . }); . } . . None . } . . fn check_arm_is_none_or_err<'tcx>(cx: &LateContext<'tcx>, mode: TryMode, arm: &Arm<'tcx>) -> bool { 294 ( 0.00%) if arm.guard.is_some() { . return false; . } . 607 ( 0.00%) let arm_body = peel_blocks(arm.body); 588 ( 0.00%) match mode { . TryMode::Result => { . // Check that pat is Err(val) 336 ( 0.00%) if let Some(ok_pat) = extract_ctor_call(cx, ResultErr, arm.pat) 18,228 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::extract_ctor_call (84x) . && let Some(ok_val) = extract_binding_pat(ok_pat) . // check `=> return Err(...)` 64 ( 0.00%) && let ExprKind::Ret(Some(wrapped_ret_expr)) = arm_body.kind . && let ExprKind::Call(ok_ctor, [ret_expr]) = wrapped_ret_expr.kind . && ok_ctor.res(cx).ctor_parent(cx).is_lang_item(cx, ResultErr) . // check if `...` is `val` from binding or `val.into()` . && is_local_or_local_into(cx, ret_expr, ok_val) . { . true . } else { . false . } . }, . TryMode::Option => { . // Check the pat is `None` 840 ( 0.00%) if is_none_pattern(cx, arm.pat) 21,036 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_none_pattern (210x) . // Check `=> return None` 339 ( 0.00%) && let ExprKind::Ret(Some(ret_expr)) = arm_body.kind 225 ( 0.00%) && is_none_expr(cx, ret_expr) 1,316 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_utils::is_none_expr (45x) 4 ( 0.00%) && !ret_expr.span.from_expansion() . { . true . } else { . false . } . }, . } 294 ( 0.00%) } . . /// Check if `expr` is `val` or `val.into()` . fn is_local_or_local_into(cx: &LateContext<'_>, expr: &Expr<'_>, val: HirId) -> bool { . let is_into_call = fn_def_id_with_node_args(cx, expr) . .and_then(|(fn_def_id, _)| cx.tcx.trait_of_assoc(fn_def_id)) . .is_some_and(|trait_def_id| cx.tcx.is_diagnostic_item(sym::Into, trait_def_id)); . match expr.kind { . ExprKind::MethodCall(_, recv, [], _) | ExprKind::Call(_, [recv]) => { . is_into_call && recv.res_local_id() == Some(val) . }, . _ => expr.res_local_id() == Some(val), . } . } . 1,470 ( 0.00%) fn check_arms_are_try<'tcx>( . cx: &LateContext<'tcx>, . mode: TryMode, . arm1: &Arm<'tcx>, . arm2: &Arm<'tcx>, . ) -> Option> { 588 ( 0.00%) (check_arm_is_none_or_err(cx, mode, arm2).then(|| check_arm_is_some_or_ok(cx, mode, arm1))) 19,926 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::question_mark::check_arm_is_none_or_err (147x) 588 ( 0.00%) .or_else(|| check_arm_is_none_or_err(cx, mode, arm1).then(|| check_arm_is_some_or_ok(cx, mode, arm2))) 30,999 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:clippy_lints::question_mark::check_arm_is_none_or_err (147x) . .flatten() 882 ( 0.00%) } . . #[derive(Debug)] . enum IfLetOrMatchThen<'tcx> { . /// Return the binding from an if let or match arm as is. . DirectReturn, . /// Working on the binding from an if let or match arm as if it comes from a `?`. . ManualUnwrap(Span, &'tcx Expr<'tcx>), . } . 20,584 ( 0.00%) fn check_if_try_match<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 12,206 ( 0.00%) if let ExprKind::Match(scrutinee, [arm1, arm2], MatchSource::Normal | MatchSource::Postfix) = expr.kind 400 ( 0.00%) && !expr.span.from_expansion() 358 ( 0.00%) && let Some(mode) = find_try_mode(cx, scrutinee) 882 ( 0.00%) && !span_contains_cfg(cx, expr.span) 134,205 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::span_contains_cfg (147x) 738 ( 0.00%) && let Some(if_let_or_match_then) = check_arms_are_try(cx, mode, arm1, arm2) 55,678 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::check_arms_are_try (147x) . { 9 ( 0.00%) span_lint_and_then( 371,564 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (1x) . cx, . QUESTION_MARK, . expr.span, . "this `match` expression can be replaced with `?`", 5 ( 0.00%) |diag| { 1 ( 0.00%) let mut applicability = Applicability::MachineApplicable; . let scrutinee_snippet = 3 ( 0.00%) snippet_with_applicability(cx, scrutinee.span.source_callsite(), "..", &mut applicability); 24 ( 0.00%) => ???:::source_callsite (1x) 3 ( 0.00%) match if_let_or_match_then { . IfLetOrMatchThen::DirectReturn => { . diag.span_suggestion( 1 ( 0.00%) expr.span, . "try instead", 3 ( 0.00%) scrutinee_snippet.into_owned() + "?", . applicability, . ); . }, . IfLetOrMatchThen::ManualUnwrap(binding_span, arm_body) => { . let indent = indent_of(cx, expr.span).unwrap_or_default(); . let arm_body_snippet = snippet_with_applicability(cx, arm_body.span, "..", &mut applicability); . let mut sugg = reindent_multiline(&arm_body_snippet, true, Some(indent)); . let binding_snippet = snippet_with_applicability(cx, binding_span, "..", &mut applicability); -- line 498 ---------------------------------------- -- line 509 ---------------------------------------- . ); . } . diag.span_suggestion(expr.span, "try instead", sugg, applicability); . }, . } . }, . ); . } 20,584 ( 0.00%) } . . fn check_if_let_some_or_err_and_early_return<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 2,603 ( 0.00%) if let Some(higher::IfLet { . let_pat, . let_expr, . if_then, . if_else, . .. 13,015 ( 0.00%) }) = higher::IfLet::hir(cx, expr) 44,558 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (2,603x) 424 ( 0.00%) && let PatKind::TupleStruct(ref path1, [field], ddpos) = let_pat.kind . && ddpos.as_opt_usize().is_none() 905 ( 0.00%) && let PatKind::Binding(BindingMode(by_ref, _), bind_id, ident, None) = field.kind 297 ( 0.00%) && let caller_ty = cx.typeck_results().expr_ty(let_expr) 3,960 ( 0.00%) => ???:::expr_ty (99x) 1,386 ( 0.00%) && let if_block = IfBlockType::IfLet( 792 ( 0.00%) cx.qpath_res(path1, let_pat.hir_id), 2,277 ( 0.00%) => ???:::qpath_res (99x) . caller_ty, . ident.name, . let_expr, . if_then, . if_else, . ) 495 ( 0.00%) && let is_option_early_return = is_early_return(sym::Option, cx, &if_block) 32,536 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::is_early_return (99x) 688 ( 0.00%) && (is_option_early_return || is_early_return(sym::Result, cx, &if_block)) 15,084 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::is_early_return (98x) 2 ( 0.00%) && if_else 19 ( 0.00%) .map(|e| eq_expr_value(cx, expr.span.ctxt(), let_expr, peel_blocks(e))) 268 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_expr_value (1x) . .is_none_or(|e| !e) . { 5 ( 0.00%) if !is_copy(cx, caller_ty) 30,188 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_copy (1x) . && let Some(hir_id) = let_expr.res_local_id() . && local_used_after_expr(cx, hir_id, expr) . { . return; . } . . // Leave `if let Some(x) = opt { .. } else { None }` to `needless_match` or `manual_map_option`. 2 ( 0.00%) if is_option_early_return 4 ( 0.00%) && if_else.is_some_and(|else_| !matches!(peel_blocks_with_stmt(else_).kind, ExprKind::Ret(_))) 17 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_blocks_with_stmt (1x) . { . return; . } . . span_lint_and_then( . cx, . QUESTION_MARK, . expr.span, -- line 562 ---------------------------------------- -- 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 { 21,844 ( 0.00%) if let Some(expr) = bl.expr 20,702 ( 0.00%) && let ExprKind::Call(callee, [_]) = expr.kind 8,274 ( 0.00%) && let ExprKind::Path(qpath) = callee.kind 2,364 ( 0.00%) && cx.tcx.qpath_is_lang_item(qpath, LangItem::TryTraitFromOutput) 62,152 ( 0.00%) => ???:::qpath_is_lang_item (591x) . { . true . } else { . false . } . } . . fn is_inferred_ret_closure(expr: &Expr<'_>) -> bool { 427,326 ( 0.01%) let ExprKind::Closure(closure) = expr.kind else { . return false; . }; . 1,674 ( 0.00%) match closure.fn_decl.output { 12 ( 0.00%) FnRetTy::Return(ret_ty) => ret_ty.is_suggestable_infer_ty(), 251 ( 0.00%) => ???:::is_suggestable_infer_ty (3x) . FnRetTy::DefaultReturn(_) => true, . } . } . . impl<'tcx> LateLintPass<'tcx> for QuestionMark { 40,040 ( 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. 11,440 ( 0.00%) if !matches!(stmt.kind, StmtKind::Let(..)) { . return; . } . 30,990 ( 0.00%) if !is_lint_allowed(cx, QUESTION_MARK_USED, stmt.hir_id) || !self.msrv.meets(cx, msrvs::QUESTION_MARK_OPERATOR) 1,980,044 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (2,066x) 55,782 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (2,066x) . { . return; . } . 14,462 ( 0.00%) if !self.inside_try_block() && !is_in_const_context(cx) { 685,471 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (2,066x) . check_let_some_else_return_none(cx, stmt); . } . self.check_manual_let_else(cx, stmt); 45,760 ( 0.00%) } . 621,460 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 186,444 ( 0.01%) if is_inferred_ret_closure(expr) { 276 ( 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(..)) 7,830 ( 0.00%) && !self.inside_try_block() 10,440 ( 0.00%) && !is_in_const_context(cx) 861,609 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (2,610x) 18,221 ( 0.00%) && is_lint_allowed(cx, QUESTION_MARK_USED, expr.hir_id) 2,728,671 ( 0.08%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (2,603x) 15,618 ( 0.00%) && self.msrv.meets(cx, msrvs::QUESTION_MARK_OPERATOR) 70,281 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (2,603x) . { . check_is_none_or_err_and_early_return(cx, expr); . check_if_let_some_or_err_and_early_return(cx, expr); . 5,206 ( 0.00%) if self.inferred_ret_closure_stack == 0 { 7,719 ( 0.00%) check_if_try_match(cx, expr); 651,174 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::check_if_try_match (2,573x) . } . } 497,444 ( 0.01%) } . . fn check_expr_post(&mut self, _: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 285 ( 0.00%) if is_inferred_ret_closure(expr) { 276 ( 0.00%) self.inferred_ret_closure_stack -= 1; . } . } . . fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'tcx>) { 7,234 ( 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>) { 7,234 ( 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; . } . } . } 23,135 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter.rs -------------------------------------------------------------------------------- Ir -- line 94 ---------------------------------------- . pub(super) const fn new(slice: &'a [T]) -> Self { . let len = slice.len(); . let ptr: NonNull = NonNull::from_ref(slice).cast(); . // SAFETY: Similar to `IterMut::new`. . unsafe { . let end_or_len = . if T::IS_ZST { without_provenance(len) } else { ptr.as_ptr().add(len) }; . 1,418 ( 0.00%) Self { ptr, end_or_len, _marker: PhantomData } . } . } . . /// Views the underlying data as a subslice of the original data. . /// . /// # Examples . /// . /// Basic usage: -- line 110 ---------------------------------------- -- line 1347 ---------------------------------------- . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl<'a, T> Iterator for Windows<'a, T> { . type Item = &'a [T]; . . #[inline] . fn next(&mut self) -> Option<&'a [T]> { 42,533 ( 0.00%) if self.size.get() > self.v.len() { . None . } else { . let ret = Some(&self.v[..self.size.get()]); . self.v = &self.v[1..]; . ret . } . } . . #[inline] . fn size_hint(&self) -> (usize, Option) { 84 ( 0.00%) if self.size.get() > self.v.len() { . (0, Some(0)) . } else { . let size = self.v.len() - self.size.get() + 1; . (size, Some(size)) . } . } . . #[inline] -- line 1374 ---------------------------------------- 11,411 ( 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. 20,826 ( 0.00%) pub(super) fn check( . cx: &LateContext<'_>, . info: &crate::methods::BinaryExprInfo<'_>, . chain_methods: &[Symbol], . lint: &'static Lint, . suggest: &str, . ) -> bool { 8,010 ( 0.00%) if let Some(args) = method_chain_args(info.chain, chain_methods) 224,812 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::method_chain_args (1,602x) . && 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 12,816 ( 0.00%) } 1,602 ( 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), 28,819 ( 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> { 559,314 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 124,292 ( 0.00%) if expr.span.from_expansion() { . return; . } 219,610 ( 0.01%) if matches!(expr.kind, ExprKind::If(..)) && !is_else_clause(cx.tcx, expr) { 166,444 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_else_clause (1,015x) 8,190 ( 0.00%) let (conds, blocks) = if_sequence(expr); 209,537 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::if_sequence (910x) 5,460 ( 0.00%) ifs_same_cond::check(cx, &conds, &mut self.interior_mut); 323,760 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ifs/ifs_same_cond.rs:clippy_lints::ifs::ifs_same_cond::check (910x) 3,640 ( 0.00%) same_functions_in_if_cond::check(cx, &conds); 417,708 ( 0.01%) => /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 (910x) . let all_same = 11,830 ( 0.00%) !is_lint_allowed(cx, IF_SAME_THEN_ELSE, expr.hir_id) && if_same_then_else::check(cx, &conds, &blocks); 1,629,061 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (910x) 422,210 ( 0.01%) => /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 (910x) 2,210 ( 0.00%) if !all_same && conds.len() != blocks.len() { 1,225 ( 0.00%) branches_sharing_code::check(cx, &conds, &blocks, expr); 1,205,386 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ifs/branches_sharing_code.rs:clippy_lints::ifs::branches_sharing_code::check (175x) . } 1,844 ( 0.00%) } else if let ExprKind::Match(_, arms, _) = expr.kind { 10,142 ( 0.00%) branches_sharing_code::check_match(cx, expr, arms); 182,661 ( 0.01%) => /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 (922x) . } 482,512 ( 0.01%) } . } 2,730 ( 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) { 8,922 ( 0.00%) param.uses = Vec::new(); 11,896 ( 0.00%) let key = (param.fn_id, param.idx); . self.by_fn.remove(&key); . // FIXME(rust/#120456) - is `swap_remove` correct? 5,948 ( 0.00%) self.by_id.swap_remove(&id); 309,828 ( 0.01%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::swap_remove:: (2,974x) . } . } . . fn get_by_id_mut(&mut self, id: HirId) -> Option<&mut Param> { 79,381 ( 0.00%) self.params.get_mut(*self.by_id.get(&id)?) 445,221 ( 0.01%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::get:: (19,833x) . } . . 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 { 9,006 ( 0.00%) self.try_disable_lint_for_param(param, &mut eval_stack); 21,014 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::try_disable_lint_for_param (3,002x) . } . } . . // Use by calling `flag_for_linting`. . fn try_disable_lint_for_param(&self, param: &Param, eval_stack: &mut Vec) -> bool { 6,004 ( 0.00%) if !param.apply_lint.get() { . true 3,002 ( 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 . } 3,002 ( 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 { 23,632 ( 0.00%) fn check_body(&mut self, cx: &LateContext<'tcx>, body: &Body<'tcx>) { 8,862 ( 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. 38,328 ( 0.00%) let (fn_id, fn_kind, skip_params) = match cx.tcx.parent_hir_node(body.value.hir_id) { 260,936 ( 0.01%) => ???:::parent_hir_node (2,379x) 312 ( 0.00%) Node::Item(i) => (i.owner_id.to_def_id(), FnKind::Fn, 0), . Node::TraitItem(&TraitItem { . kind: TraitItemKind::Fn(ref sig, _), 48 ( 0.00%) owner_id, . .. . }) => ( . owner_id.to_def_id(), . FnKind::TraitFn, . usize::from(sig.decl.implicit_self().has_implicit_self()), 12 ( 0.00%) ), . Node::ImplItem(&ImplItem { . kind: ImplItemKind::Fn(ref sig, _), 1,851 ( 0.00%) owner_id, 1,851 ( 0.00%) impl_kind, . .. . }) => { 7,057 ( 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); 694 ( 0.00%) let trait_ref = cx.tcx.impl_trait_ref(impl_id).instantiate_identity().skip_norm_wip(); 24,937 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::impl_trait_ref:: (347x) . ( . 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, . }; 4,038 ( 0.00%) body.params . .iter() . .enumerate() . .skip(skip_params) 12,068 ( 0.00%) .filter_map(|(idx, p)| match p.pat.kind { 30,076 ( 0.00%) PatKind::Binding(_, id, ident, None) if !ident.as_str().starts_with('_') => { 96,512 ( 0.00%) => ???:::as_str (3,016x) . Some((id, Param::new(fn_id, fn_kind, idx, ident))) . }, . _ => None, . }) . .for_each(|(id, param)| self.params.insert(param, id)); 2,019 ( 0.00%) if self.entered_body.is_none() { 4,008 ( 0.00%) self.entered_body = Some(body.value.hir_id); . } 23,632 ( 0.00%) } . 435,022 ( 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(); 3,023 ( 0.00%) let span = e.span; . let mut e = e; . loop { 20,768 ( 0.00%) match get_expr_use_or_unification_node(cx.tcx, e) { 668,784 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_or_unification_node (3,304x) . None | Some((Node::Stmt(_), _)) => return, 36,714 ( 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) 8,228 ( 0.00%) if callee.res(cx).opt_def_id().is_some_and(|id| { 2,501 ( 0.00%) id == param.fn_id && has_matching_args(param.fn_kind, typeck.node_args(callee.hir_id)) 2,535 ( 0.00%) => ???:::node_args (65x) 6,884 ( 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, _) 17,979 ( 0.00%) if typeck.type_dependent_def_id(parent.hir_id).is_some_and(|id| { 70,593 ( 0.00%) => ???:::type_dependent_def_id (1,383x) . 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. 176 ( 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) 78 ( 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) 1,080 ( 0.00%) if typeck.expr_ty(lhs).is_primitive() && typeck.expr_ty(rhs).is_primitive() => 10,800 ( 0.00%) => ???:::expr_ty (270x) . { . e = parent; . continue; . }, 245 ( 0.00%) ExprKind::Unary(_, arg) if typeck.expr_ty(arg).is_primitive() => { 1,960 ( 0.00%) => ???:::expr_ty (49x) . 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; . } . } 497,168 ( 0.01%) } . 20,678 ( 0.00%) fn check_body_post(&mut self, cx: &LateContext<'tcx>, body: &Body<'tcx>) { 2,313 ( 0.00%) if self.entered_body == Some(body.value.hir_id) { 2,004 ( 0.00%) self.entered_body = None; . self.params.flag_for_linting(); . for param in &self.params.params { 6,004 ( 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(); . } 23,632 ( 0.00%) } . } . . fn has_matching_args(kind: FnKind, args: GenericArgsRef<'_>) -> bool { 260 ( 0.00%) match kind { . FnKind::Fn => true, . FnKind::TraitFn => args.iter().enumerate().all(|(idx, subst)| match subst.kind() { . GenericArgKind::Lifetime(_) => true, . GenericArgKind::Type(ty) => matches!(*ty.kind(), ty::Param(ty) if ty.index as usize == idx), . GenericArgKind::Const(c) => matches!(c.kind(), ConstKind::Param(c) if c.index as usize == idx), . }), 130 ( 0.00%) FnKind::ImplTraitFn(expected_args) => std::ptr::from_ref(args) as usize == expected_args, . } . } 58,767 ( 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 272 ---------------------------------------- . /// if let Some(ptr) = NonNull::::new(std::ptr::null_mut()) { . /// unreachable!(); . /// } . /// ``` . #[stable(feature = "nonnull", since = "1.25.0")] . #[rustc_const_stable(feature = "const_nonnull_new", since = "1.85.0")] . #[inline] . pub const fn new(ptr: *mut T) -> Option { 2 ( 0.00%) if !ptr.is_null() { . // SAFETY: The pointer is already checked and is not null . Some(unsafe { Self::new_unchecked(ptr) }) . } else { . None . } . } . . /// Converts a reference to a `NonNull` pointer. -- line 288 ---------------------------------------- -- 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 { 1,641 ( 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. 622,339 ( 0.02%) 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 483 ---------------------------------------- . /// [the module documentation]: crate::ptr#safety . #[stable(feature = "nonnull", since = "1.25.0")] . #[rustc_const_stable(feature = "const_ptr_as_ref", since = "1.83.0")] . #[must_use] . #[inline(always)] . pub const unsafe fn as_mut<'a>(&mut self) -> &'a mut T { . // SAFETY: the caller must guarantee that `self` meets all the . // requirements for a mutable reference. 2 ( 0.00%) unsafe { &mut *self.as_ptr() } . } . . /// Casts to a pointer of another type. . /// . /// # Examples . /// . /// ``` . /// use std::ptr::NonNull; -- line 499 ---------------------------------------- -- 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`. 437 ( 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`. 3,704,270 ( 0.10%) 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 { 6,280,262 ( 0.17%) 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 ---------------------------------------- 242,696 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/validations.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use super::Utf8Error; . use crate::intrinsics::const_eval_select; . . /// Returns the initial codepoint accumulator for the first byte. . /// The first byte is special, only want bottom 5 bits for width 2, 4 bits . /// for width 3, and 3 bits for width 4. . #[inline] . const fn utf8_first_byte(byte: u8, width: u32) -> u32 { 72 ( 0.00%) (byte & (0x7F >> width)) as u32 . } . . /// Returns the value of `ch` updated with continuation byte `byte`. . #[inline] . const fn utf8_acc_cont_byte(ch: u32, byte: u8) -> u32 { 168 ( 0.00%) (ch << 6) | (byte & CONT_MASK) as u32 . } . . /// Checks whether the byte is a UTF-8 continuation byte (i.e., starts with the . /// bits `10`). . #[inline] . pub(super) const fn utf8_is_cont_byte(byte: u8) -> bool { . (byte as i8) < -64 . } -- line 25 ---------------------------------------- -- 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 339,531 ( 0.01%) let x = *bytes.next()?; 739,537 ( 0.02%) if x < 128 { . return Some(x as u32); . } . . // Multibyte case follows . // Decode from a byte combination out of: [[[x y] z] w] . // NOTE: Performance is sensitive to the exact formulation here . let init = utf8_first_byte(x, 2); . // SAFETY: `bytes` produces an UTF-8-like string, . // so the iterator must produce a value here. . let y = unsafe { *bytes.next().unwrap_unchecked() }; . let mut ch = utf8_acc_cont_byte(init, y); 72 ( 0.00%) if x >= 0xE0 { . // [[x y z] w] case . // 5th bit in 0xE0 .. 0xEF is always clear, so `init` is still valid . // SAFETY: `bytes` produces an UTF-8-like string, . // so the iterator must produce a value here. . let z = unsafe { *bytes.next().unwrap_unchecked() }; . let y_z = utf8_acc_cont_byte((y & CONT_MASK) as u32, z); . ch = init << 12 | y_z; 79 ( 0.00%) if x >= 0xF0 { . // [x y z w] case . // use only the lower 3 bits of `init` . // SAFETY: `bytes` produces an UTF-8-like string, . // so the iterator must produce a value here. . let w = unsafe { *bytes.next().unwrap_unchecked() }; 24 ( 0.00%) ch = (init & 7) << 18 | utf8_acc_cont_byte(y_z, w); . } . } . . Some(ch) 5 ( 0.00%) } . . /// Reads the last code point out of a byte iterator (assuming a . /// UTF-8-like encoding). . /// . /// # Safety . /// . /// `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()? { 171,911 ( 0.00%) next_byte if next_byte < 128 => return Some(next_byte as u32), . back_byte => back_byte, . }; . . // Multibyte case follows . // Decode from a byte combination out of: [x [y [z w]]] . let mut ch; . // SAFETY: `bytes` produces an UTF-8-like string, . // so the iterator must produce a value here. -- line 92 ---------------------------------------- 468,149 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/vec_init_then_push.rs -------------------------------------------------------------------------------- Ir -- line 57 ---------------------------------------- . lhs_is_let: bool, . let_ty_span: Option, . name: Symbol, . err_span: Span, . found: u128, . last_push_expr: HirId, . } . impl VecPushSearcher { 119 ( 0.00%) fn display_err(&self, cx: &LateContext<'_>) { . let required_pushes_before_extension = match self.init { 85 ( 0.00%) _ if self.found == 0 => return, . VecInitKind::WithConstCapacity(x) if x > self.found => return, . VecInitKind::WithConstCapacity(x) => x, . VecInitKind::WithExprCapacity(_) => return, . _ => 3, . }; . . let mut needs_mut = false; . let res = for_each_local_use_after_expr(cx, self.local_id, self.last_push_expr, |e| { -- line 75 ---------------------------------------- -- line 142 ---------------------------------------- . cx, . VEC_INIT_THEN_PUSH, . self.err_span, . "calls to `push` immediately after creation", . "consider using the `vec![]` macro", . s, . Applicability::HasPlaceholders, . ); 136 ( 0.00%) } . } . . impl<'tcx> LateLintPass<'tcx> for VecInitThenPush { . fn check_block(&mut self, _: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { 5,461 ( 0.00%) self.searcher = None; . } . 14,462 ( 0.00%) fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'tcx>) { 6,198 ( 0.00%) if let Some(init_expr) = local.init 14,304 ( 0.00%) && let PatKind::Binding(BindingMode::MUT, id, name, None) = local.pat.kind 840 ( 0.00%) && !local.span.in_external_macro(cx.sess().source_map()) 1,400 ( 0.00%) && let Some(init) = get_vec_init_kind(cx, init_expr) 24,202 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::get_vec_init_kind (280x) 42 ( 0.00%) && !matches!(init, VecInitKind::WithExprCapacity(_)) . { 255 ( 0.00%) self.searcher = Some(VecPushSearcher { . local_id: id, . init, . lhs_is_let: true, 17 ( 0.00%) let_ty_span: local.ty.map(|ty| ty.span), . name: name.name, . err_span: local.span, . found: 0, 17 ( 0.00%) last_push_expr: init_expr.hir_id, . }); . } 16,528 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 186,370 ( 0.01%) if self.searcher.is_none() 629 ( 0.00%) && let ExprKind::Assign(left, right, _) = expr.kind 2,523 ( 0.00%) && let ExprKind::Path(QPath::Resolved(None, path)) = left.kind 506 ( 0.00%) && let [name] = &path.segments 759 ( 0.00%) && let Res::Local(id) = path.res 2,024 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) 29,601 ( 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 (253x) 1,265 ( 0.00%) && let Some(init) = get_vec_init_kind(cx, right) 6,272 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::get_vec_init_kind (253x) . && !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, . }); . } 62,146 ( 0.00%) } . . fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { 11,661 ( 0.00%) if let Some(searcher) = self.searcher.take() { 48 ( 0.00%) if let StmtKind::Expr(expr) | StmtKind::Semi(expr) = stmt.kind 28 ( 0.00%) && !stmt.span.from_expansion() 38 ( 0.00%) && let ExprKind::MethodCall(name, self_arg, [_], _) = expr.kind 4 ( 0.00%) && self_arg.res_local_id() == Some(searcher.local_id) . && name.ident.name == sym::push . { . self.searcher = Some(VecPushSearcher { . err_span: searcher.err_span.to(stmt.span), . found: searcher.found + 1, . last_push_expr: expr.hir_id, . ..searcher . }); . } else { 17 ( 0.00%) searcher.display_err(cx); 340 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/vec_init_then_push.rs:::display_err (17x) . } . } 5,720 ( 0.00%) } . . fn check_block_post(&mut self, cx: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { 10,922 ( 0.00%) if let Some(searcher) = self.searcher.take() { . searcher.display_err(cx); . } . } . } 11,200 ( 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. 11,212 ( 0.00%) if let ItemKind::Use(path, kind @ (UseKind::Single(_) | UseKind::Glob)) = item.kind 2,776 ( 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 9,671 ( 0.00%) && let Some(res) = path.res.present_items().next() 1,386 ( 0.00%) && let Some(def_id) = res.opt_def_id() 3,465 ( 0.00%) && self.msrv.meets(cx, msrvs::NUMERIC_ASSOCIATED_CONSTANTS) 18,711 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (693x) . { . let module = if is_integer_module(cx, def_id) { . true 4,158 ( 0.00%) } else if is_numeric_const(cx, def_id) { 49,293 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/legacy_numeric_constants.rs:clippy_lints::legacy_numeric_constants::is_numeric_const (693x) . 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") . ); . } . }, . ); . } 2,572 ( 0.00%) } . 621,460 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx rustc_hir::Expr<'tcx>) { . // `std::::` check 278,258 ( 0.01%) let (sugg, msg) = if let ExprKind::Path(qpath) = &expr.kind . && let QPath::Resolved(None, path) = qpath 21,875 ( 0.00%) && let Some(def_id) = path.res.opt_def_id() 35,112 ( 0.00%) && is_numeric_const(cx, def_id) 435,929 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/legacy_numeric_constants.rs:clippy_lints::legacy_numeric_constants::is_numeric_const (5,016x) 48 ( 0.00%) && let [.., mod_name, name] = &*cx.get_def_path(def_id) 3,980 ( 0.00%) => ???:::get_def_path (4x) . // 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]) . { 24 ( 0.00%) (format!("{mod_name}::{name}"), "usage of a legacy numeric constant") . // `::xxx_value` check 92,966 ( 0.00%) } else if let ExprKind::Call(func, []) = &expr.kind 1,114 ( 0.00%) && let ExprKind::Path(qpath) = &func.kind 1,106 ( 0.00%) && let QPath::TypeRelative(ty, last_segment) = qpath 1,635 ( 0.00%) && let Some(def_id) = cx.qpath_res(qpath, func.hir_id).opt_def_id() 25,578 ( 0.00%) => ???:::qpath_res (327x) 327 ( 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; . }; . 16 ( 0.00%) if !expr.span.in_external_macro(cx.sess().source_map()) 24 ( 0.00%) && self.msrv.meets(cx, msrvs::NUMERIC_ASSOCIATED_CONSTANTS) 108 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (4x) 20 ( 0.00%) && !is_from_proc_macro(cx, expr) 2,630 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::is_from_proc_macro:: (4x) . { 64 ( 0.00%) span_lint_and_then(cx, LEGACY_NUMERIC_CONSTANTS, expr.span, msg, |diag| { 1,337,719 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::check_expr::{closure#0}> (4x) . diag.span_suggestion_verbose( 4 ( 0.00%) expr.span, . "use the associated constant instead", . sugg, . Applicability::MaybeIncorrect, . ); . }); . } 497,168 ( 0.01%) } . } . . fn is_integer_module(cx: &LateContext<'_>, did: DefId) -> bool { 3,465 ( 0.00%) matches!( 3,465 ( 0.00%) cx.tcx.get_diagnostic_name(did), 40,961 ( 0.00%) => ???:::get_diagnostic_name (693x) . 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 . ) . ) . } . 5,709 ( 0.00%) fn is_numeric_const(cx: &LateContext<'_>, did: DefId) -> bool { 34,272 ( 0.00%) matches!( 17,127 ( 0.00%) cx.tcx.get_diagnostic_name(did), 416,684 ( 0.01%) => ???:::get_diagnostic_name (5,709x) . 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 . ) . ) 11,418 ( 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 { 8 ( 0.00%) let [ . hir::PathSegment { . ident: one, args: None, .. . }, . hir::PathSegment { . ident: two, args: None, .. . }, . ] = expr_path.segments . else { . return false; . }; . . one.name == mod_name && two.name == name . } . . fn is_integer_method(cx: &LateContext<'_>, did: DefId) -> bool { 981 ( 0.00%) matches!( 654 ( 0.00%) cx.tcx.get_diagnostic_name(did), 21,008 ( 0.00%) => ???:::get_diagnostic_name (327x) . 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 ---------------------------------------- 77,019 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_float_methods.rs -------------------------------------------------------------------------------- Ir -- line 93 ---------------------------------------- . . impl ManualFloatMethods { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . fn is_not_const(tcx: TyCtxt<'_>, def_id: DefId) -> bool { 143 ( 0.00%) match tcx.def_kind(def_id) { . DefKind::Mod . | DefKind::Struct . | DefKind::Union . | DefKind::Enum . | DefKind::Variant . | DefKind::Trait . | DefKind::TyAlias . | DefKind::ForeignTy -- line 109 ---------------------------------------- -- line 128 ---------------------------------------- . | DefKind::Ctor(..) . | DefKind::AssocConst { .. } => false, . . DefKind::Fn | DefKind::AssocFn | DefKind::Closure => tcx.constness(def_id) == Constness::NotConst, . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualFloatMethods { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 126,305 ( 0.00%) if let ExprKind::Binary(kind, lhs, rhs) = expr.kind 3,513 ( 0.00%) && let ExprKind::Binary(lhs_kind, lhs_lhs, lhs_rhs) = lhs.kind 912 ( 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`. 399 ( 0.00%) && let mut exprs = [lhs_lhs, lhs_rhs, rhs_lhs, rhs_rhs] 280 ( 0.00%) && exprs.iter_mut().partition_in_place(|i| i.res_local_id().is_some()) == 2 68 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . && ( 78 ( 0.00%) is_not_const(cx.tcx, cx.tcx.hir_enclosing_body_owner(expr.hir_id).into()) 9,309 ( 0.00%) => ???:::hir_enclosing_body_owner (13x) . || self.msrv.meets(cx, msrvs::CONST_FLOAT_CLASSIFY) . ) 52 ( 0.00%) && let [first, second, const_1, const_2] = exprs 91 ( 0.00%) && let ecx = ConstEvalCtxt::new(cx) 728 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (13x) . && let ctxt = expr.span.ctxt() 100 ( 0.00%) && let Some(const_1) = ecx.eval_local(const_1, ctxt) 1,855 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local (13x) 50 ( 0.00%) && let Some(const_2) = ecx.eval_local(const_2, ctxt) 970 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local (7x) 5 ( 0.00%) && first.res_local_id().is_some_and(|f| second.res_local_id().is_some_and(|s| f == s)) . // The actual infinity check, we also allow `NEG_INFINITY` before` INFINITY` just in . // case somebody does that for some reason . && (const_1.is_pos_infinity() && const_2.is_neg_infinity() . || const_1.is_neg_infinity() && const_2.is_pos_infinity()) . && let Some(local_snippet) = first.span.get_text(cx) . { . let variant = match (kind.node, lhs_kind.node, rhs_kind.node) { . (BinOpKind::Or, BinOpKind::Eq, BinOpKind::Eq) => Variant::ManualIsInfinite, -- line 162 ---------------------------------------- -- line 196 ---------------------------------------- . expr.span, . "or, for conciseness", . format!("!{local_snippet}.is_infinite()"), . Applicability::MaybeIncorrect, . ); . }, . } . }); 12 ( 0.00%) } 300 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue:: (12x) 497,168 ( 0.01%) } . } 594 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/clone_on_copy.rs -------------------------------------------------------------------------------- Ir -- line 13 ---------------------------------------- . . #[derive(Clone, Copy, Debug, PartialEq, Eq)] . enum ParentIsSuffixExpr { . Yes, . No, . Return, . } . 120 ( 0.00%) fn check_parent_is_suffix_expr(cx: &LateContext<'_>, expr: &Expr<'_>) -> ParentIsSuffixExpr { 152 ( 0.00%) match cx.tcx.parent_hir_node(expr.hir_id) { 1,310 ( 0.00%) => ???:::parent_hir_node (12x) 8 ( 0.00%) Node::Expr(parent) => match parent.kind { . // &*x is a nop, &x.clone() is not . ExprKind::AddrOf(..) => ParentIsSuffixExpr::Return, . // (*x).func() is useless, x.clone().func() can work in case func borrows self . ExprKind::MethodCall(_, self_arg, ..) . if expr.hir_id == self_arg.hir_id . && cx.typeck_results().expr_ty(expr) != cx.typeck_results().expr_ty_adjusted(expr) => . { . ParentIsSuffixExpr::Return . }, . // ? is a Call, makes sure not to rec *x?, but rather (*x)? 3 ( 0.00%) ExprKind::Call(hir_callee, [_]) => { 3 ( 0.00%) if matches!( . hir_callee.kind, . ExprKind::Path(qpath) 8 ( 0.00%) if cx.tcx.qpath_is_lang_item(qpath, rustc_hir::LangItem::TryTraitBranch) 11 ( 0.00%) => ???:::qpath_is_lang_item (1x) . ) { . ParentIsSuffixExpr::Yes . } else { . ParentIsSuffixExpr::No . } . }, . ExprKind::MethodCall(_, self_arg, ..) if expr.hir_id == self_arg.hir_id => ParentIsSuffixExpr::Yes, . ExprKind::Match(_, _, MatchSource::TryDesugar(_) | MatchSource::AwaitDesugar) . | ExprKind::Field(..) . | ExprKind::Index(..) => ParentIsSuffixExpr::Yes, . _ => ParentIsSuffixExpr::No, . }, . // local binding capturing a reference 20 ( 0.00%) Node::LetStmt(l) if matches!(l.pat.kind, PatKind::Binding(BindingMode(ByRef::Yes(..), _), ..)) => { . ParentIsSuffixExpr::Return . }, . _ => ParentIsSuffixExpr::No, . } 96 ( 0.00%) } . . /// Checks for the `CLONE_ON_COPY` lint. 798 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, receiver: &Expr<'_>) { . if cx . .typeck_results() 456 ( 0.00%) .type_dependent_def_id(expr.hir_id) 5,814 ( 0.00%) => ???:::type_dependent_def_id (114x) 798 ( 0.00%) .and_then(|id| cx.tcx.trait_of_assoc(id)) 30,210 ( 0.00%) => ???:::trait_of_assoc (114x) 228 ( 0.00%) .zip(cx.tcx.lang_items().clone_trait()) 4,560 ( 0.00%) => ???:::lang_items (114x) . .is_none_or(|(x, y)| x != y) . { . return; . } 342 ( 0.00%) let arg_adjustments = cx.typeck_results().expr_adjustments(receiver); 4,938 ( 0.00%) => ???:::expr_adjustments (114x) . let arg_ty = arg_adjustments . .last() . .map_or_else(|| cx.typeck_results().expr_ty(receiver), |a| a.target); . 456 ( 0.00%) let ty = cx.typeck_results().expr_ty(expr); 4,560 ( 0.00%) => ???:::expr_ty (114x) 228 ( 0.00%) if let ty::Ref(_, inner, _) = arg_ty.kind() 342 ( 0.00%) && let ty::Ref(..) = inner.kind() . { . return; // don't report clone_on_copy . } . 456 ( 0.00%) if !is_copy(cx, ty) { 570,799 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_copy (114x) . return; . } 48 ( 0.00%) let check_res = check_parent_is_suffix_expr(cx, expr); 1,734 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/clone_on_copy.rs:clippy_lints::methods::clone_on_copy::check_parent_is_suffix_expr (12x) 24 ( 0.00%) if check_res == ParentIsSuffixExpr::Return { . return; . } . 12 ( 0.00%) let mut app = Applicability::MachineApplicable; 72 ( 0.00%) let snip = snippet_with_context(cx, receiver.span, expr.span.ctxt(), "_", &mut app).0; . . let deref_count = arg_adjustments . .iter() 18 ( 0.00%) .take_while(|adj| matches!(adj.kind, Adjust::Deref(_))) . .count(); 48 ( 0.00%) let (help, sugg) = if deref_count == 0 { 30 ( 0.00%) ("try removing the `clone` call", snip.into()) 12 ( 0.00%) } else if check_res == ParentIsSuffixExpr::Yes { . ("try dereferencing it", format!("({}{snip})", "*".repeat(deref_count))) . } else { 42 ( 0.00%) ("try dereferencing it", format!("{}{snip}", "*".repeat(deref_count))) . }; . 180 ( 0.00%) span_lint_and_sugg( 2,677,827 ( 0.07%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_sugg:: (12x) . cx, . CLONE_ON_COPY, . expr.span, 60 ( 0.00%) with_forced_trimmed_paths!(format!( 48 ( 0.00%) => ???:::new (12x) . "using `clone` on type `{ty}` which implements the `Copy` trait" . )), . help, . sugg, . app, . ); 936 ( 0.00%) } . 19,299 ( 0.00%) pub(super) fn check_function(cx: &LateContext<'_>, expr: &Expr<'_>) { 8,271 ( 0.00%) let ExprKind::Call(func, args) = expr.kind else { return }; . 16,526 ( 0.00%) if let ExprKind::Path(qpath) = func.kind 16,518 ( 0.00%) && let Some(def_id) = cx.typeck_results().qpath_res(&qpath, func.hir_id).opt_def_id() 94,899 ( 0.00%) => ???:::qpath_res (2,753x) 26,658 ( 0.00%) && cx.tcx.trait_of_assoc(def_id) == cx.tcx.lang_items().clone_trait() 341,500 ( 0.01%) => ???:::trait_of_assoc (2,631x) 105,240 ( 0.00%) => ???:::lang_items (2,631x) . && let [arg] = args 16 ( 0.00%) && let ty = cx.typeck_results().expr_ty(expr) 160 ( 0.00%) => ???:::expr_ty (4x) . { 20 ( 0.00%) if !is_copy(cx, ty) { 23,192 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_copy (4x) . return; . } . . let check_res = check_parent_is_suffix_expr(cx, expr); . if check_res == ParentIsSuffixExpr::Return { . return; . } . -- line 135 ---------------------------------------- -- line 166 ---------------------------------------- . with_forced_trimmed_paths!(format!( . "using `clone` on type `{ty}` which implements the `Copy` trait" . )), . help, . sugg, . app, . ); . } 22,056 ( 0.00%) } 11,357 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/matches/wild_in_or_pats.rs -------------------------------------------------------------------------------- Ir . use clippy_utils::diagnostics::span_lint_and_help; . use clippy_utils::{has_non_exhaustive_attr, is_wild}; . use rustc_hir::{Arm, Expr, PatKind}; . use rustc_lint::LateContext; . use rustc_middle::ty; . . use super::WILDCARD_IN_OR_PATTERNS; . 7,376 ( 0.00%) pub(crate) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, arms: &[Arm<'_>]) { . // first check if we are matching on an enum that has the non_exhaustive attribute 922 ( 0.00%) let ty = cx.typeck_results().expr_ty(expr).peel_refs(); 36,928 ( 0.00%) => ???:::expr_ty (922x) . if let ty::Adt(adt_def, _) = ty.kind() 4,560 ( 0.00%) && has_non_exhaustive_attr(cx.tcx, *adt_def) 1,300,507 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::has_non_exhaustive_attr (912x) . { . return; . } . for arm in arms { 6,416 ( 0.00%) if let PatKind::Or(fields) = arm.pat.kind . // look for multiple fields in this arm that contains at least one Wild pattern 62 ( 0.00%) && fields.len() > 1 && fields.iter().any(is_wild) . { . span_lint_and_help( . cx, . WILDCARD_IN_OR_PATTERNS, 1 ( 0.00%) arm.pat.span, . "wildcard pattern covers any other pattern as it will match anyway", 1 ( 0.00%) None, . "consider handling `_` separately", . ); . } . } 7,376 ( 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> { 621,460 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 3,066 ( 0.00%) if let Some(macro_call) = root_macro_call_first_node(cx, expr) 3,066 ( 0.00%) && is_format_macro(cx, macro_call.def_id) 93,189 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::is_format_macro (511x) 2,824 ( 0.00%) && let Some(format_args) = self.format_args.get(cx, expr, macro_call.expn) 1,265,371 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:::get (353x) . { 2,700 ( 0.00%) let mut linter = FormatArgsExpr { . cx, . expr, . macro_call: ¯o_call, . format_args, 270 ( 0.00%) ignore_mixed: self.ignore_mixed, . msrv: &self.msrv, 270 ( 0.00%) ty_msrv_map: &self.ty_msrv_map, 270 ( 0.00%) has_derived_debug: &mut self.has_derived_debug, 270 ( 0.00%) has_pointer_format: &mut self.has_pointer_format, . }; . . linter.check_trailing_comma(); . linter.check_templates(); . 1,620 ( 0.00%) if self.msrv.meets(cx, msrvs::FORMAT_ARGS_CAPTURE) { 7,290 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (270x) . linter.check_uninlined_args(); . } . } 497,168 ( 0.01%) } . } . . struct FormatArgsExpr<'a, 'tcx> { . cx: &'a LateContext<'tcx>, . expr: &'tcx Expr<'tcx>, . macro_call: &'a MacroCall, . format_args: &'a rustc_ast::FormatArgs, . ignore_mixed: bool, -- line 373 ---------------------------------------- -- line 375 ---------------------------------------- . ty_msrv_map: &'a FxHashMap, Option>, . has_derived_debug: &'a mut FxHashMap, bool>, . has_pointer_format: &'a mut FxHashMap, bool>, . } . . impl<'tcx> FormatArgsExpr<'_, 'tcx> { . /// Check if there is a comma after the last format macro arg. . fn check_trailing_comma(&self) { 270 ( 0.00%) let span = self.macro_call.span; 1,890 ( 0.00%) if let Some(src) = span.get_text(self.cx) 270 ( 0.00%) && let Some(src) = src.strip_suffix([')', ']', '}']) 6,750 ( 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 (270x) . && let src = src.trim_end_matches(|c: char| c.is_whitespace() && c != '\n') . && let Some(src) = src.strip_suffix(',') . && let src = src.trim_end_matches(|c: char| c.is_whitespace() && c != '\n') 1 ( 0.00%) && !src.ends_with('\n') . { 12 ( 0.00%) span_lint_and_sugg( 1,310 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_sugg:: (1x) . self.cx, . UNNECESSARY_TRAILING_COMMA, . span.with_lo(span.lo() + BytePos::from_usize(src.len())) . .with_hi(span.hi() - BytePos(1)), . "unnecessary trailing comma", . "remove the trailing comma", . String::new(), . Applicability::MachineApplicable, . ); . } . } . . fn check_templates(&mut self) { 270 ( 0.00%) for piece in &self.format_args.template { 1,056 ( 0.00%) if let FormatArgsPiece::Placeholder(placeholder) = piece 196 ( 0.00%) && let Ok(index) = placeholder.argument.index 196 ( 0.00%) && let Some(arg) = self.format_args.arguments.all_args().get(index) 784 ( 0.00%) && let Some(arg_expr) = find_format_arg_expr(self.expr, arg) 208,265 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::find_format_arg_expr (196x) . { 196 ( 0.00%) self.check_unused_format_specifier(placeholder, arg_expr); 196 ( 0.00%) self.check_useless_format_width(placeholder); 784 ( 0.00%) self.check_useless_borrows_in_formatting(placeholder, arg_expr); 177,529 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/format_args.rs:::check_useless_borrows_in_formatting (196x) . . // Check width and precision arguments the same way as the value . for opt in [&placeholder.format_options.width, &placeholder.format_options.precision] { . if let Some(FormatCount::Argument(position)) = opt.as_ref() . && let Ok(pos_index) = position.index . && let Some(pos_arg) = self.format_args.arguments.all_args().get(pos_index) . && let Some(pos_arg_expr) = find_format_arg_expr(self.expr, pos_arg) . { . self.check_useless_borrows_in_formatting(placeholder, pos_arg_expr); . } . } . 258 ( 0.00%) if placeholder.format_trait == Display 385 ( 0.00%) && placeholder.format_options == FormatOptions::default() 3,428 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/format.rs:::eq (77x) 76 ( 0.00%) && !self.is_aliased(index) . { 380 ( 0.00%) let name = self.cx.tcx.item_name(self.macro_call.def_id); 304 ( 0.00%) self.check_format_in_format_args(name, arg_expr); 152 ( 0.00%) self.check_to_string_in_format_args(name, arg_expr); . } . . if placeholder.format_trait == Debug { 545 ( 0.00%) let name = self.cx.tcx.item_name(self.macro_call.def_id); . self.check_unnecessary_debug_formatting(name, arg_expr); 327 ( 0.00%) if let Some(span) = placeholder.span 872 ( 0.00%) && self.has_pointer_debug(self.cx.typeck_results().expr_ty(arg_expr), 0) 2,348,277 ( 0.06%) => site/frontend/rust-clippy/clippy_lints/src/format_args.rs:::has_pointer_debug (109x) 4,372 ( 0.00%) => ???:::expr_ty (109x) . { . span_lint(self.cx, POINTER_FORMAT, span, "pointer formatting detected"); . } . } . . if placeholder.format_trait == Pointer . && let Some(span) = placeholder.span . { . span_lint(self.cx, POINTER_FORMAT, span, "pointer formatting detected"); . } . } . } . } . 2,156 ( 0.00%) fn check_useless_borrows_in_formatting(&self, placeholder: &FormatPlaceholder, arg_expr: &Expr<'tcx>) { . // Updated while peeling: 196 ( 0.00%) let mut only_mutable = true; 196 ( 0.00%) let mut has_mutable = false; . 392 ( 0.00%) if !arg_expr.span.from_expansion() 392 ( 0.00%) && !is_from_proc_macro(self.cx, arg_expr) 1,493 ( 0.00%) && let Some(fmt_trait) = match placeholder.format_trait { . Display => self.cx.tcx.get_diagnostic_item(sym::Display), . Debug => self.cx.tcx.get_diagnostic_item(sym::Debug), . _ => None, . } 1,116 ( 0.00%) && let Some(sized_trait) = self.cx.tcx.lang_items().sized_trait() 7,440 ( 0.00%) => ???:::lang_items (186x) 1,860 ( 0.00%) && let peeled_expr = peel_hir_expr_while(arg_expr, |e| { 3,534 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_while::<::check_useless_borrows_in_formatting::{closure#0}> (186x) . // Need to handle `&&&T` to `&T` when a single ref is still required 372 ( 0.00%) if let ExprKind::AddrOf(BorrowKind::Ref, m, e) = e.kind . && let ty = self.cx.typeck_results().expr_ty(e) . && implements_trait(self.cx, ty, sized_trait, &[]) . && implements_trait(self.cx, ty, fmt_trait, &[]) . { . only_mutable = only_mutable && m == Mutability::Mut; . has_mutable = has_mutable || m == Mutability::Mut; . Some(e) . } else { . None . } . }) 186 ( 0.00%) && !std::ptr::eq(arg_expr, peeled_expr) . && let Some(peeled_snippet) = snippet_opt(self.cx, peeled_expr.span) . { . let name = self.cx.tcx.item_name(self.macro_call.def_id); . let message = if only_mutable { . "remove the redundant `&mut`" . } else if has_mutable { . "remove the redundant `&`/`&mut`" . } else { -- line 489 ---------------------------------------- -- line 494 ---------------------------------------- . USELESS_BORROWS_IN_FORMATTING, . arg_expr.span, . format!("redundant reference in `{name}!` argument"), . message, . peeled_snippet, . Applicability::MachineApplicable, . ); . } 1,568 ( 0.00%) } . . fn check_unused_format_specifier(&self, placeholder: &FormatPlaceholder, arg: &Expr<'_>) { . let options = &placeholder.format_options; . 588 ( 0.00%) if let Some(placeholder_span) = placeholder.span 392 ( 0.00%) && *options != FormatOptions::default() 17 ( 0.00%) && let ty = self.cx.typeck_results().expr_ty(arg).peel_refs() 680 ( 0.00%) => ???:::expr_ty (17x) . && ty.is_lang_item(self.cx, LangItem::FormatArguments) . { . span_lint_and_then( . self.cx, . UNUSED_FORMAT_SPECS, . placeholder_span, . "format specifiers have no effect on `format_args!()`", . |diag| { -- line 517 ---------------------------------------- -- line 549 ---------------------------------------- . }, . ); . } . } . . /// Lint when format width has no effect on the output because the format trait's . /// minimum output is larger (e.g. `{:#02X}` outputs "0x1" so width 2 has no effect). . fn check_useless_format_width(&self, placeholder: &FormatPlaceholder) { 1,010 ( 0.00%) let min_width = match placeholder.format_trait { . // 0x prefix, e.g. 0x1, 0o1, 0b1 30 ( 0.00%) LowerHex | UpperHex | Octal | Binary if placeholder.format_options.alternate => 4, . LowerExp | UpperExp | Pointer => 4, // e.g. 1e0 with exponent, 0x1 for pointer . _ => return, . }; . if let Some(FormatCount::Literal(width_value)) = placeholder.format_options.width . && width_value < min_width . && let Some(placeholder_span) = placeholder.span . { . span_lint_and_help( -- line 567 ---------------------------------------- -- line 571 ---------------------------------------- . "format width has no effect on the output for this format trait", . None, . format!("consider removing the width or increasing it to at least {min_width}"), . ); . } . } . . fn check_uninlined_args(&self) { 810 ( 0.00%) if self.format_args.span.from_expansion() { . return; . } 1,080 ( 0.00%) if self.macro_call.span.edition() < Edition2021 15,660 ( 0.00%) => ???:::edition (270x) . && (is_panic(self.cx, self.macro_call.def_id) || is_assert_macro(self.cx, self.macro_call.def_id)) . { . // panic!, assert!, and debug_assert! before 2021 edition considers a single string argument as . // non-format . return; . } . . let mut fixes = Vec::new(); . // If any of the arguments are referenced by an index number, . // and that argument is not a simple variable and cannot be inlined, . // we cannot remove any other arguments in the format string, . // because the index numbers might be wrong after inlining. . // Example of an un-inlinable format: print!("{}{1}", foo, 2) 2,970 ( 0.00%) for (pos, usage) in self.format_arg_positions() { 146 ( 0.00%) if !self.check_one_arg(pos, usage, &mut fixes) { . return; . } . } . 197 ( 0.00%) if fixes.is_empty() { . return; . } . . // multiline span display suggestion is sometimes broken: https://github.com/rust-lang/rust/pull/102729#discussion_r988704308 . // in those cases, make the code suggestion hidden 71 ( 0.00%) let multiline_fix = fixes . .iter() 231 ( 0.00%) .any(|(span, _)| self.cx.sess().source_map().is_multiline(*span)); 88,944 ( 0.00%) => ???:::is_multiline (160x) . . // Suggest removing each argument only once, for example in `format!("{0} {0}", arg)`. . fixes.sort_unstable_by_key(|(span, _)| *span); . fixes.dedup_by_key(|(span, _)| *span); . 710 ( 0.00%) span_lint_and_then( 132,929 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::check_uninlined_args::{closure#3}> (71x) . self.cx, . UNINLINED_FORMAT_ARGS, 71 ( 0.00%) self.macro_call.span, . "variables can be used directly in the `format!` string", 426 ( 0.00%) |diag| { . diag.multipart_suggestion_with_style( . "change this to", . fixes, . Applicability::MachineApplicable, . if multiline_fix { CompletelyHidden } else { ShowCode }, . ); . }, . ); 71 ( 0.00%) } . . fn check_one_arg(&self, pos: &FormatArgPosition, usage: FormatParamUsage, fixes: &mut Vec<(Span, String)>) -> bool { 168 ( 0.00%) let index = pos.index.unwrap(); 672 ( 0.00%) let arg = &self.format_args.arguments.all_args()[index]; . 336 ( 0.00%) if !matches!(arg.kind, FormatArgumentKind::Captured(_)) 702 ( 0.00%) && let rustc_ast::ExprKind::Path(None, path) = &arg.expr.kind 198 ( 0.00%) && let [segment] = path.segments.as_slice() 95 ( 0.00%) && segment.args.is_none() 380 ( 0.00%) && let Some(arg_span) = format_arg_removal_span(self.format_args, index) 14,957 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::format_arg_removal_span (95x) 285 ( 0.00%) && let Some(pos_span) = pos.span . { 190 ( 0.00%) let replacement = match usage { . FormatParamUsage::Argument => segment.ident.name.to_string(), . FormatParamUsage::Width => format!("{}$", segment.ident.name), . FormatParamUsage::Precision => format!(".{}$", segment.ident.name), . }; 570 ( 0.00%) fixes.push((pos_span, replacement)); 380 ( 0.00%) fixes.push((arg_span, String::new())); . true // successful inlining, continue checking . } else { . // Do not continue inlining (return false) in case . // * if we can't inline a numbered argument, e.g. `print!("{0} ...", foo.bar, ...)` . // * if allow_mixed_uninlined_format_args is false and this arg hasn't been inlined already . pos.kind != FormatArgPositionKind::Number 365 ( 0.00%) && (!self.ignore_mixed || matches!(arg.kind, FormatArgumentKind::Captured(_))) . } . } . . fn check_format_in_format_args(&self, name: Symbol, arg: &Expr<'_>) { . let expn_data = arg.span.ctxt().outer_expn_data(); 152 ( 0.00%) if expn_data.call_site.from_expansion() { . return; . } 304 ( 0.00%) let Some(mac_id) = expn_data.macro_def_id else { return }; 380 ( 0.00%) if !self.cx.tcx.is_diagnostic_item(sym::format_macro, mac_id) { 4,104 ( 0.00%) => ???:::is_diagnostic_item (76x) . return; . } . span_lint_and_then( . self.cx, . FORMAT_IN_FORMAT_ARGS, . self.macro_call.span, . format!("`format!` in `{name}!` args"), . |diag| { -- line 674 ---------------------------------------- -- line 677 ---------------------------------------- . )); . diag.help("or consider changing `format!` to `format_args!`"); . }, . ); . } . . fn check_to_string_in_format_args(&self, name: Symbol, value: &Expr<'_>) { . let cx = self.cx; 152 ( 0.00%) if !value.span.from_expansion() 36 ( 0.00%) && let ExprKind::MethodCall(_, receiver, [], to_string_span) = value.kind 36 ( 0.00%) && cx . .typeck_results() 54 ( 0.00%) .type_dependent_def_id(value.hir_id) 918 ( 0.00%) => ???:::type_dependent_def_id (18x) 18 ( 0.00%) .opt_parent(cx) . .is_diag_item(cx, sym::ToString) . && let receiver_ty = cx.typeck_results().expr_ty(receiver) . && let Some(display_trait_id) = cx.tcx.get_diagnostic_item(sym::Display) . && let (n_needed_derefs, target) = . count_needed_derefs(receiver_ty, cx.typeck_results().expr_adjustments(receiver).iter()) . && implements_trait(cx, target, display_trait_id, &[]) . && let Some(sized_trait_id) = cx.tcx.lang_items().sized_trait() . && let Some(receiver_snippet) = receiver.span.source_callsite().get_text(cx) -- line 698 ---------------------------------------- -- line 722 ---------------------------------------- . ), . Applicability::MachineApplicable, . ); . } . } . } . . fn check_unnecessary_debug_formatting(&self, name: Symbol, value: &Expr<'tcx>) { 109 ( 0.00%) let cx = self.cx; 981 ( 0.00%) if !is_in_test(cx.tcx, value.hir_id) 502,871 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_test (109x) 218 ( 0.00%) && !value.span.from_expansion() 218 ( 0.00%) && !is_from_proc_macro(cx, value) 218 ( 0.00%) && let ty = cx.typeck_results().expr_ty(value) 4,372 ( 0.00%) => ???:::expr_ty (109x) . && self.can_display_format(ty) . { . // If the parent function is a method of `Debug`, we don't want to lint . // because it is likely that the user wants to use `Debug` formatting. . let parent_fn = cx.tcx.hir_get_parent_item(value.hir_id); . if let Some(trait_ref) = trait_ref_of_method(cx, parent_fn) . && let Some(trait_def_id) = trait_ref.trait_def_id() . && cx.tcx.is_diagnostic_item(sym::Debug, trait_def_id) -- line 742 ---------------------------------------- -- line 760 ---------------------------------------- . be removed", . ); . }, . ); . } . } . . fn format_arg_positions(&self) -> impl Iterator { 1,566 ( 0.00%) self.format_args.template.iter().flat_map(|piece| match piece { . FormatArgsPiece::Placeholder(placeholder) => { . let mut positions = ArrayVec::<_, 3>::new(); . . positions.push((&placeholder.argument, FormatParamUsage::Argument)); 1,560 ( 0.00%) if let Some(FormatCount::Argument(position)) = &placeholder.format_options.width { . positions.push((position, FormatParamUsage::Width)); . } 828 ( 0.00%) if let Some(FormatCount::Argument(position)) = &placeholder.format_options.precision { . positions.push((position, FormatParamUsage::Precision)); . } . 2,208 ( 0.00%) positions . }, . FormatArgsPiece::Literal(_) => ArrayVec::new(), . }) . } . . /// Returns true if the format argument at `index` is referred to by multiple format params . fn is_aliased(&self, index: usize) -> bool { . self.format_arg_positions() -- line 788 ---------------------------------------- -- line 789 ---------------------------------------- . .filter(|(position, _)| position.index == Ok(index)) . .at_most_one() . .is_err() . } . . fn can_display_format(&self, ty: Ty<'tcx>) -> bool { . let ty = ty.peel_refs(); . 109 ( 0.00%) if let Some(msrv) = self.ty_msrv_map.get(&ty) . && msrv.is_none_or(|msrv| self.msrv.meets(self.cx, msrv)) . { . return true; . } . . // Even if `ty` is not in `self.ty_msrv_map`, check whether `ty` implements `Deref` with . // a `Target` that is in `self.ty_msrv_map`. 436 ( 0.00%) if let Some(deref_trait_id) = self.cx.tcx.lang_items().deref_trait() 4,360 ( 0.00%) => ???:::lang_items (109x) 981 ( 0.00%) && implements_trait(self.cx, ty, deref_trait_id, &[]) 294,637 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (109x) . && let Some(target_ty) = self.cx.get_associated_type(ty, deref_trait_id, sym::Target) . && let Some(msrv) = self.ty_msrv_map.get(&target_ty) . && msrv.is_none_or(|msrv| self.msrv.meets(self.cx, msrv)) . { . return true; . } . . false . } . 1,250 ( 0.00%) fn has_pointer_debug(&mut self, ty: Ty<'tcx>, depth: usize) -> bool { 125 ( 0.00%) let cx = self.cx; 250 ( 0.00%) let tcx = cx.tcx; 250 ( 0.00%) if !tcx.recursion_limit().value_within_limit(depth) { 4,360 ( 0.00%) => ???:::recursion_limit (109x) . return false; . } 375 ( 0.00%) let depth = depth + 1; 375 ( 0.00%) let typing_env = cx.typing_env(); 3,270 ( 0.00%) => ???:::typing_env (109x) 125 ( 0.00%) let ty = tcx.normalize_erasing_regions(typing_env, Unnormalized::new_wip(ty)); 826 ( 0.00%) match ty.kind() { . ty::RawPtr(..) | ty::FnPtr(..) | ty::FnDef(..) => true, 44 ( 0.00%) ty::Ref(_, t, _) | ty::Slice(t) | ty::Array(t, _) => self.has_pointer_debug(*t, depth), 71,588 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/format_args.rs:::has_pointer_debug'2 (11x) . ty::Tuple(ts) => ts.iter().any(|t| self.has_pointer_debug(t, depth)), . ty::Adt(adt, args) => { 54 ( 0.00%) match self.has_pointer_format.entry(ty) { 32 ( 0.00%) Entry::Occupied(o) => return *o.get(), . Entry::Vacant(v) => v.insert(false), . }; 22 ( 0.00%) let derived_debug = if let Some(&known) = self.has_derived_debug.get(&ty) { . known . } else { 110 ( 0.00%) let Some(trait_id) = tcx.get_diagnostic_item(sym::Debug) else { 1,696 ( 0.00%) => ???:::get_diagnostic_item (16x) . return false; . }; 154 ( 0.00%) let (infcx, param_env) = tcx.infer_ctxt().build_with_typing_env(typing_env); 2,000 ( 0.00%) => ???:0x0000000000173dc0 (16x) 1,792 ( 0.00%) => ???:::build_with_typing_env (16x) 132 ( 0.00%) let trait_ref = TraitRef::new(tcx, trait_id, [GenericArg::from(ty)]); 1,872 ( 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:>::new::<[rustc_middle::ty::Ty; 1]> (16x) 132 ( 0.00%) let obligation = Obligation { . cause: ObligationCause::dummy(), . param_env, . recursion_depth: 0, . predicate: trait_ref.upcast(tcx), . }; 44 ( 0.00%) let selection = SelectionContext::new(&infcx).select(&obligation); 2,241,281 ( 0.06%) => ???:::select (16x) 272 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue:: (16x) 176 ( 0.00%) let derived = if let Ok(Some(Selection::UserDefined(data))) = selection { 98 ( 0.00%) find_attr!(tcx, data.impl_def_id, AutomaticallyDerived) 1,695 ( 0.00%) => ???:>::get_attrs (16x) . } else { . false . }; 22 ( 0.00%) self.has_derived_debug.insert(ty, derived); . derived 110 ( 0.00%) }; 4,300 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue:: (16x) 44 ( 0.00%) let pointer_debug = derived_debug 10 ( 0.00%) && adt.all_fields().any(|f| { 60 ( 0.00%) self.has_pointer_debug(tcx.normalize_erasing_regions(typing_env, f.ty(tcx, args)), depth) 555 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/format_args.rs:::has_pointer_debug'2 (5x) 345 ( 0.00%) => ???:::ty (5x) . }); 22 ( 0.00%) self.has_pointer_format.insert(ty, pointer_debug); . pointer_debug 22 ( 0.00%) }, . _ => false, . } 1,000 ( 0.00%) } . } . . fn make_ty_msrv_map(tcx: TyCtxt<'_>) -> FxHashMap, Option> { . [(sym::OsStr, Some(msrvs::OS_STR_DISPLAY)), (sym::Path, None)] . .into_iter() . .filter_map(|(name, feature)| { 6 ( 0.00%) tcx.get_diagnostic_item(name).map(|def_id| { 425,201 ( 0.01%) => ???:::get_diagnostic_item (2x) . let ty = Ty::new_adt(tcx, tcx.adt_def(def_id), List::empty()); . (ty, feature) . }) . }) . .collect() . } . . fn count_needed_derefs<'tcx, I>(mut ty: Ty<'tcx>, mut iter: I) -> (usize, Ty<'tcx>) -- line 882 ---------------------------------------- 5,618 ( 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 } . } . 73,320 ( 0.00%) fn check_res_emit(&self, cx: &LateContext<'_>, res: &Res, span: Span) { 69,148 ( 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), . ); 87,984 ( 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>) { 7,048 ( 0.00%) if let ItemKind::Use(path, UseKind::Single(_)) = &item.kind 5,340 ( 0.00%) && let Some(res) = path.res.type_ns . { 2,628 ( 0.00%) self.check_res_emit(cx, &res, item.span); 11,826 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_res_emit (657x) . } . } . . fn check_ty(&mut self, cx: &LateContext<'tcx>, ty: &'tcx Ty<'tcx, AmbigArg>) { 49,395 ( 0.00%) if let TyKind::Path(path) = &ty.kind { 150,161 ( 0.00%) self.check_res_emit(cx, &cx.qpath_res(path, ty.hir_id), ty.span); 314,573 ( 0.01%) => ???:::qpath_res (13,651x) 237,350 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_res_emit (13,651x) . } . } . . fn check_poly_trait_ref(&mut self, cx: &LateContext<'tcx>, poly: &'tcx PolyTraitRef<'tcx>) { 3,204 ( 0.00%) self.check_res_emit(cx, &poly.trait_ref.path.res, poly.trait_ref.path.span); 6,408 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_types.rs:::check_res_emit (356x) . } . } 657 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_is_ascii_check.rs -------------------------------------------------------------------------------- Ir -- line 65 ---------------------------------------- . } . . impl ManualIsAsciiCheck { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . 6 ( 0.00%) #[derive(Debug, PartialEq)] . enum CharRange { . /// 'a'..='z' | b'a'..=b'z' . LowerChar, . /// 'A'..='Z' | b'A'..=b'Z' . UpperChar, . /// `AsciiLower` | `AsciiUpper` . FullChar, . /// '0..=9' -- line 81 ---------------------------------------- -- line 85 ---------------------------------------- . /// 'A..=F' . UpperHexLetter, . /// '0..=9' | 'a..=f' | 'A..=F' . HexDigit, . Otherwise, . } . . impl<'tcx> LateLintPass<'tcx> for ManualIsAsciiCheck { 559,314 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 196,064 ( 0.01%) if !matches!( 124,292 ( 0.00%) expr.kind, 7,964 ( 0.00%) ExprKind::Match(_, [_, ..], _) | ExprKind::MethodCall(_, _, [_], _) . ) { . return; . } . 24,906 ( 0.00%) if !self.msrv.meets(cx, msrvs::IS_ASCII_DIGIT) { 96,066 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (3,558x) . return; . } . 14,250 ( 0.00%) if is_in_const_context(cx) && !self.msrv.meets(cx, msrvs::IS_ASCII_DIGIT_CONST) { 1,175,351 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (3,558x) 81 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (3x) . return; . } . 27,650 ( 0.00%) let (arg, span, range) = if let ExprKind::Match(recv, [arm, ..], _) = expr.kind 9,613 ( 0.00%) && let Some(macro_call) = matching_root_macro_call(cx, expr.span, sym::matches_macro) 193,405 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::matching_root_macro_call (1,372x) . { 36 ( 0.00%) let recv = peel_ref_operators(cx, recv); 431 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_ref_operators (9x) 18 ( 0.00%) let range = check_pat(&arm.pat.kind); 648 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_is_ascii_check.rs:clippy_lints::manual_is_ascii_check::check_pat (9x) . (recv, macro_call.span, range) 10,930 ( 0.00%) } else if let ExprKind::MethodCall(path, receiver, [arg], ..) = expr.kind 2,186 ( 0.00%) && path.ident.name == sym::contains 63 ( 0.00%) && let Some(higher::Range { . start: Some(start), . end: Some(end), . ty: range_ty, . span: _, 252 ( 0.00%) }) = higher::Range::hir(cx, receiver) 2,853 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (63x) . && let RangeLimits::Closed = range_ty.limits() . && !matches!(cx.typeck_results().expr_ty(arg).peel_refs().kind(), ty::Param(_)) . { . let arg = peel_ref_operators(cx, arg); . let range = check_expr_range(start, end); . (arg, expr.span, range) . } else { . return; . }; . 9 ( 0.00%) let ty_sugg = get_ty_sugg(cx, arg); . check_is_ascii(cx, span, arg, &range, ty_sugg); 497,168 ( 0.01%) } . } . . fn get_ty_sugg<'tcx>(cx: &LateContext<'tcx>, arg: &Expr<'_>) -> Option<(Span, Ty<'tcx>)> { . let local_hid = arg.res_local_id()?; 16 ( 0.00%) if let Node::Param(Param { ty_span, span, .. }) = cx.tcx.parent_hir_node(local_hid) 446 ( 0.00%) => ???:::parent_hir_node (4x) . // `ty_span` and `span` are the same for inferred type, thus a type suggestion must be given 4 ( 0.00%) && ty_span == span . { 16 ( 0.00%) let arg_type = cx.typeck_results().expr_ty(arg); 160 ( 0.00%) => ???:::expr_ty (4x) 12 ( 0.00%) return Some((*ty_span, arg_type)); . } . None . } . . fn check_is_ascii( . cx: &LateContext<'_>, . span: Span, . recv: &Expr<'_>, . range: &CharRange, . ty_sugg: Option<(Span, Ty<'_>)>, . ) { 45 ( 0.00%) let sugg = match range { . CharRange::UpperChar => "is_ascii_uppercase", . CharRange::LowerChar => "is_ascii_lowercase", . CharRange::FullChar => "is_ascii_alphabetic", . CharRange::Digit => "is_ascii_digit", . CharRange::HexDigit => "is_ascii_hexdigit", . CharRange::Otherwise | CharRange::LowerHexLetter | CharRange::UpperHexLetter => return, . }; . let mut app = Applicability::MachineApplicable; -- line 165 ---------------------------------------- -- line 175 ---------------------------------------- . span, . "manual check for common ascii range", . |diag| { . diag.multipart_suggestion("try", suggestion, app); . }, . ); . } . 75 ( 0.00%) fn check_pat(pat_kind: &PatKind<'_>) -> CharRange { 135 ( 0.00%) match pat_kind { . PatKind::Or(pats) => { 18 ( 0.00%) let ranges = pats.iter().map(|p| check_pat(&p.kind)).collect::>(); 120 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_is_ascii_check.rs:clippy_lints::manual_is_ascii_check::check_pat'2 (6x) . 6 ( 0.00%) if ranges.len() == 2 && ranges.contains(&CharRange::UpperChar) && ranges.contains(&CharRange::LowerChar) { . CharRange::FullChar . } else if ranges.len() == 3 . && ranges.contains(&CharRange::Digit) . && ranges.contains(&CharRange::LowerHexLetter) . && ranges.contains(&CharRange::UpperHexLetter) . { . CharRange::HexDigit . } else { . CharRange::Otherwise . } . }, . PatKind::Range(Some(start), Some(end), RangeEnd::Included) => check_range(start, end), . _ => CharRange::Otherwise, . } 90 ( 0.00%) } . . fn check_expr_range(start: &Expr<'_>, end: &Expr<'_>) -> CharRange { . if let ExprKind::Lit(start_lit) = &start.kind . && let ExprKind::Lit(end_lit) = &end.kind . { . check_lit_range(start_lit, end_lit) . } else { . CharRange::Otherwise -- line 211 ---------------------------------------- 152 ( 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, . { 3,348 ( 0.00%) ZipImpl::new(a.into_iter(), b.into_iter()) . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl Iterator for Zip . where . A: Iterator, . B: Iterator, . { -- line 78 ---------------------------------------- -- line 144 ---------------------------------------- . Self: Iterator + TrustedRandomAccessNoCoerce; . } . . // Work around limitations of specialization, requiring `default` impls to be repeated . // in intermediary impls. . macro_rules! zip_impl_general_defaults { . () => { . default fn new(a: A, b: B) -> Self { 198 ( 0.00%) Zip { . a, . b, . index: 0, // unused . len: 0, // unused . } . } . . #[inline] . default fn next(&mut self) -> Option<(A::Item, B::Item)> { 353 ( 0.00%) let x = self.a.next()?; 54 ( 0.00%) let y = self.b.next()?; 5,860 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/unicode-normalization-0.1.25/src/recompose.rs: as core::iter::traits::iterator::Iterator>::next (27x) 302 ( 0.00%) Some((x, y)) 27 ( 0.00%) } . . #[inline] . default fn nth(&mut self, n: usize) -> Option { . self.super_nth(n) . } . . #[inline] . default fn next_back(&mut self) -> Option<(A::Item, B::Item)> -- line 173 ---------------------------------------- -- line 287 ---------------------------------------- . . impl ZipImpl for Zip . where . A: TrustedRandomAccess + Iterator, . B: TrustedRandomAccess + Iterator, . { . fn new(a: A, b: B) -> Self { . let len = cmp::min(a.size(), b.size()); 1,404 ( 0.00%) Zip { a, b, index: 0, len } . } . . #[inline] . fn next(&mut self) -> Option<(A::Item, B::Item)> { 81,305 ( 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 7,841 ( 0.00%) self.index += 1; . // SAFETY: `i` is smaller than `self.len`, thus smaller than `self.a.len()` and `self.b.len()` . unsafe { 1,652 ( 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,579 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_abs_diff.rs -------------------------------------------------------------------------------- Ir -- line 49 ---------------------------------------- . . impl ManualAbsDiff { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for ManualAbsDiff { 497,168 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 124,292 ( 0.00%) if !expr.span.from_expansion() . && let Some(if_expr) = If::hir(expr) . && let Some(r#else) = if_expr.r#else 762 ( 0.00%) && let ExprKind::Binary(op, rhs, lhs) = if_expr.cond.kind 592 ( 0.00%) && let (BinOpKind::Gt | BinOpKind::Ge, mut a, mut b) | (BinOpKind::Lt | BinOpKind::Le, mut b, mut a) = . (op.node, rhs, lhs) 22 ( 0.00%) && let Some((ty, b_n_refs)) = self.are_ty_eligible(cx, a, b) 220 ( 0.00%) && is_sub_expr(cx, if_expr.then, a, b, ty) 4,289 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_abs_diff.rs:clippy_lints::manual_abs_diff::is_sub_expr (22x) 9 ( 0.00%) && is_sub_expr(cx, r#else, b, a, ty) 2,930 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_abs_diff.rs:clippy_lints::manual_abs_diff::is_sub_expr (1x) . { 3 ( 0.00%) span_lint_and_then( 373,524 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::check_expr::{closure#0}> (1x) . cx, . MANUAL_ABS_DIFF, 2 ( 0.00%) expr.span, . "manual absolute difference pattern without using `abs_diff`", 12 ( 0.00%) |diag| { 1 ( 0.00%) if is_unsuffixed_numeral_lit(a) && !is_unsuffixed_numeral_lit(b) { . (a, b) = (b, a); . } . let applicability = { 4 ( 0.00%) if span_contains_comment(cx, if_expr.then.span) || span_contains_comment(cx, r#else.span) { . Applicability::MaybeIncorrect . } else { . Applicability::MachineApplicable . } . }; 11 ( 0.00%) let sugg = format!( 126 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue:: (2x) . "{}.abs_diff({}{})", 8 ( 0.00%) Sugg::hir(cx, a, "..").maybe_paren(), 1,480 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/sugg.rs:::hir (1x) 38 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/sugg.rs:::maybe_paren (1x) 1 ( 0.00%) "*".repeat(b_n_refs), 7 ( 0.00%) Sugg::hir(cx, b, "..") 1,476 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/sugg.rs:::hir (1x) . ); 1 ( 0.00%) diag.span_suggestion(expr.span, "replace with `abs_diff`", sugg, applicability); . }, . ); . } 497,168 ( 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)> { 208 ( 0.00%) let is_int = |ty: Ty<'_>| matches!(ty.kind(), ty::Uint(_) | ty::Int(_)) && self.msrv.meets(cx, msrvs::ABS_DIFF); 594 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (22x) . let is_duration = 4 ( 0.00%) |ty: Ty<'_>| ty.is_diag_item(cx, sym::Duration) && self.msrv.meets(cx, msrvs::DURATION_ABS_DIFF); . 96 ( 0.00%) let a_ty = cx.typeck_results().expr_ty(a).peel_refs(); 960 ( 0.00%) => ???:::expr_ty (24x) 144 ( 0.00%) let (b_ty, b_n_refs, _) = peel_and_count_ty_refs(cx.typeck_results().expr_ty(b)); 960 ( 0.00%) => ???:::expr_ty (24x) 216 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::peel_and_count_ty_refs (24x) . 70 ( 0.00%) (a_ty == b_ty && (is_int(a_ty) || is_duration(a_ty))).then_some((a_ty, b_n_refs)) . } . } . . /// Checks if the given expression is a subtraction operation between two expected expressions, . /// i.e. if `expr` is `{expected_a} - {expected_b}`. . /// . /// If `expected_ty` is a signed primitive integer, this function will only return `Some` if the . /// subtraction expr is wrapped in a cast to the equivalent unsigned int. 621 ( 0.00%) fn is_sub_expr( . cx: &LateContext<'_>, . expr: &Expr<'_>, . expected_a: &Expr<'_>, . expected_b: &Expr<'_>, . expected_ty: Ty<'_>, . ) -> bool { . let expr = peel_blocks(expr); . 46 ( 0.00%) if let ty::Int(ty) = expected_ty.kind() { . let unsigned = Ty::new_uint(cx.tcx, ty.to_unsigned()); . . return if let ExprKind::Cast(expr, cast_ty) = expr.kind . && cx.typeck_results().node_type(cast_ty.hir_id) == unsigned . { . is_sub_expr(cx, expr, expected_a, expected_b, unsigned) . } else { . false . }; . } . 23 ( 0.00%) let ctxt = expr.span.ctxt(); 50 ( 0.00%) if let ExprKind::Binary(op, a, b) = expr.kind 4 ( 0.00%) && let BinOpKind::Sub = op.node 10 ( 0.00%) && eq_expr_value(cx, ctxt, a, expected_a) 2,848 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_expr_value (2x) 22 ( 0.00%) && eq_expr_value(cx, ctxt, b, expected_b) 2,848 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_expr_value (2x) . { . true . } else { . false . } 189 ( 0.00%) } . . fn is_unsuffixed_numeral_lit(expr: &Expr<'_>) -> bool { 2 ( 0.00%) matches!(expr.kind, ExprKind::Lit(lit) if lit.node.is_numeric() && lit.node.is_unsuffixed()) . } 336 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 18,004 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 6,234 ( 0.00%) if let ItemKind::Impl(imp) = item.kind 2,180 ( 0.00%) && let Some(trait_ref) = imp.of_trait 3,364 ( 0.00%) && let Some(trait_id) = trait_ref.trait_ref.trait_def_id() 10,933 ( 0.00%) => ???:::trait_def_id (841x) 5,887 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::Wake, trait_id) 68,178 ( 0.00%) => ???:::is_diagnostic_item (841x) . && 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", . ); . } 20,576 ( 0.00%) } . } 5,046 ( 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; . 12,318 ( 0.00%) pub fn check(cx: &LateContext<'_>, collected_breaks: &[Span]) { 4,106 ( 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: `\\`"); . }, . ); 14,371 ( 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 { 559,314 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 62,146 ( 0.00%) let span = expr.span; 248,584 ( 0.01%) if !span.in_external_macro(cx.tcx.sess.source_map()) && 366,904 ( 0.01%) let Some(body_expr) = desugar_async_block(cx, expr) && 483,651 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/redundant_async_block.rs:clippy_lints::redundant_async_block::desugar_async_block (45,863x) . 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, . ); . } 497,168 ( 0.01%) } . } . . /// If `expr` is a desugared `async` block, return the original expression if it does not capture . /// any variable by ref. 137,589 ( 0.00%) fn desugar_async_block<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option<&'tcx Expr<'tcx>> { 91,726 ( 0.00%) if let ExprKind::Closure(Closure { body, def_id, kind, .. }) = expr.kind 831 ( 0.00%) && let body = cx.tcx.hir_body(*body) 23,082 ( 0.00%) => ???:::hir_body (277x) 554 ( 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 . } 183,452 ( 0.01%) } 46,417 ( 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); 1,656,891 ( 0.05%) self.msrv.check_attributes(attrs); 2,685,832 ( 0.07%) => /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 (293,484x) . } . . fn check_attributes_post(&mut self, cx: &rustc_lint::EarlyContext<'_>, attrs: &[rustc_ast::ast::Attribute]) { . let sess = rustc_lint::LintContext::sess(cx); 1,583,520 ( 0.04%) self.msrv.check_attributes_post(attrs); 2,685,832 ( 0.07%) => /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 (293,484x) . } . }; . } . . /// 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 . /// ``` 45,240 ( 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)) 45 ( 0.00%) .filter(|init| cx.typeck_results().expr_adjustments(init).is_empty()) 591 ( 0.00%) => ???:::expr_adjustments (15x) . { . expr = init; . } . expr 27,135 ( 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`. 288 ( 0.00%) pub fn find_binding_init<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Expr<'tcx>> { 832 ( 0.00%) if let Node::Pat(pat) = cx.tcx.hir_node(hir_id) 3,212 ( 0.00%) => ???:::hir_node (50x) 584 ( 0.00%) && matches!(pat.kind, PatKind::Binding(BindingMode::NONE, ..)) 509 ( 0.00%) && let Node::LetStmt(local) = cx.tcx.parent_hir_node(hir_id) 4,826 ( 0.00%) => ???:::parent_hir_node (43x) . { 16 ( 0.00%) return local.init; . } . None 240 ( 0.00%) } . . /// Checks if the given local has an initializer or is from something other than a `let` statement . /// . /// e.g. returns true for `x` in `fn f(x: usize) { .. }` and `let x = 1;` but false for `let x;` . pub fn local_is_initialized(cx: &LateContext<'_>, local: HirId) -> bool { . for (_, node) in cx.tcx.hir_parent_iter(local) { . match node { . Node::Pat(..) | Node::PatField(..) => {}, -- line 203 ---------------------------------------- -- line 216 ---------------------------------------- . /// `tcx.hir_is_inside_const_context(_)`. . /// . /// Do not call this unless the `LateContext` has an enclosing body. For release build this case . /// will safely return `false`, but debug builds will ICE. Note that `check_expr`, `check_block`, . /// `check_pat` and a few other entry points will always have an enclosing body. Some entry points . /// like `check_path` or `check_ty` may or may not have one. . pub fn is_in_const_context(cx: &LateContext<'_>) -> bool { . debug_assert!(cx.enclosing_body.is_some(), "`LateContext` has no enclosing body"); 79,564 ( 0.00%) cx.enclosing_body.is_some_and(|id| { 39,782 ( 0.00%) cx.tcx 198,910 ( 0.01%) .hir_body_const_context(cx.tcx.hir_body_owner_def_id(id)) 7,669,089 ( 0.21%) => ???:::hir_body_const_context (39,782x) 4,924,550 ( 0.14%) => ???:::hir_body_owner_def_id (39,782x) . .is_some() . }) 39,782 ( 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 17,302 ( 0.00%) pub fn is_inside_always_const_context(tcx: TyCtxt<'_>, hir_id: HirId) -> bool { . use rustc_hir::ConstContext::{Const, ConstFn, Static}; 69,208 ( 0.00%) let Some(ctx) = tcx.hir_body_const_context(tcx.hir_enclosing_body_owner(hir_id)) else { 4,972,963 ( 0.14%) => ???:::hir_enclosing_body_owner (8,651x) 1,662,520 ( 0.05%) => ???:::hir_body_const_context (8,651x) . return false; . }; . match ctx { . ConstFn => false, . Static(_) . | Const { . allow_const_fn_promotion: _, . } => true, . } 17,302 ( 0.00%) } . . /// Checks if `{ctor_call_id}(...)` is `{enum_item}::{variant_name}(...)`. . pub fn is_enum_variant_ctor( . cx: &LateContext<'_>, . enum_item: Symbol, . variant_name: Symbol, . ctor_call_id: DefId, . ) -> bool { -- line 257 ---------------------------------------- -- line 277 ---------------------------------------- . }, . _ => did, . }; . . cx.tcx.is_diagnostic_item(item, did) . } . . /// Checks if the `DefId` matches the given `LangItem` or it's constructor. 3,000 ( 0.00%) pub fn is_lang_item_or_ctor(cx: &LateContext<'_>, did: DefId, item: LangItem) -> bool { 2,100 ( 0.00%) let did = match cx.tcx.def_kind(did) { . DefKind::Ctor(..) => cx.tcx.parent(did), . // Constructors for types in external crates seem to have `DefKind::Variant` . DefKind::Variant => match cx.tcx.opt_parent(did) { . Some(did) if matches!(cx.tcx.def_kind(did), DefKind::Variant) => did, . _ => did, . }, . _ => did, . }; . 600 ( 0.00%) cx.tcx.lang_items().get(item) == Some(did) 12,000 ( 0.00%) => ???:::lang_items (300x) 2,400 ( 0.00%) } . . /// Checks is `expr` is `None` . pub fn is_none_expr(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 39 ( 0.00%) expr.basic_res().ctor_parent(cx).is_lang_item(cx, OptionNone) 5,210 ( 0.00%) } . . /// If `expr` is `Some(inner)`, returns `inner` 153 ( 0.00%) pub fn as_some_expr<'tcx>(cx: &LateContext<'_>, expr: &'tcx Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { 346 ( 0.00%) if let ExprKind::Call(e, [arg]) = expr.kind 50 ( 0.00%) && e.basic_res().ctor_parent(cx).is_lang_item(cx, OptionSome) . { . Some(arg) . } else { . None . } 153 ( 0.00%) } . . /// Check if the given `Expr` is an empty block (i.e. `{}`) or not. . pub fn is_empty_block(expr: &Expr<'_>) -> bool { . matches!( . expr.kind, . ExprKind::Block( . Block { . stmts: [], -- line 321 ---------------------------------------- -- line 324 ---------------------------------------- . }, . _, . ) . ) . } . . /// Checks if `expr` is an empty block or an empty tuple. . pub fn is_unit_expr(expr: &Expr<'_>) -> bool { 3,756 ( 0.00%) matches!( 2,478 ( 0.00%) expr.kind, . ExprKind::Block( . Block { 3 ( 0.00%) stmts: [], . expr: None, . .. . }, . _ 5 ( 0.00%) ) | ExprKind::Tup([]) . ) . } . . /// Checks if given pattern is a wildcard (`_`) . pub fn is_wild(pat: &Pat<'_>) -> bool { 265 ( 0.00%) matches!(pat.kind, PatKind::Wild) . } . . /// If `pat` is: . /// - `Some(inner)`, returns `inner` . /// - it will _usually_ contain just one element, but could have two, given patterns like . /// `Some(inner, ..)` or `Some(.., inner)` . /// - `Some`, returns `[]` . /// - otherwise, returns `None` 468 ( 0.00%) pub fn as_some_pattern<'a, 'hir>(cx: &LateContext<'_>, pat: &'a Pat<'hir>) -> Option<&'a [Pat<'hir>]> { 390 ( 0.00%) if let PatKind::TupleStruct(ref qpath, inner, _) = pat.kind 156 ( 0.00%) && cx 390 ( 0.00%) .qpath_res(qpath, pat.hir_id) 1,794 ( 0.00%) => ???:::qpath_res (78x) 78 ( 0.00%) .ctor_parent(cx) . .is_lang_item(cx, OptionSome) . { . Some(inner) . } else { . None . } 624 ( 0.00%) } . . /// Checks if the `pat` is `None`. . pub fn is_none_pattern(cx: &LateContext<'_>, pat: &Pat<'_>) -> bool { 12,113 ( 0.00%) matches!(pat.kind, 700 ( 0.00%) PatKind::Expr(PatExpr { kind: PatExprKind::Path(qpath), .. }) 4,200 ( 0.00%) if cx.qpath_res(qpath, pat.hir_id).ctor_parent(cx).is_lang_item(cx, OptionNone)) 2,484 ( 0.00%) => ???:::qpath_res (108x) 4,630 ( 0.00%) } . . /// Checks if `arm` has the form `None => None`. 2,196 ( 0.00%) pub fn is_none_arm(cx: &LateContext<'_>, arm: &Arm<'_>) -> bool { 676 ( 0.00%) is_none_pattern(cx, arm.pat) . && matches!( 202 ( 0.00%) peel_blocks(arm.body).kind, 4 ( 0.00%) ExprKind::Path(qpath) 23 ( 0.00%) if cx.qpath_res(&qpath, arm.body.hir_id).ctor_parent(cx).is_lang_item(cx, OptionNone) 92 ( 0.00%) => ???:::qpath_res (4x) . ) 2,562 ( 0.00%) } . . /// Checks if the given `QPath` belongs to a type alias. . pub fn is_ty_alias(qpath: &QPath<'_>) -> bool { 5,432 ( 0.00%) match *qpath { 25,904 ( 0.00%) QPath::Resolved(_, path) => matches!(path.res, Res::Def(DefKind::TyAlias | DefKind::AssocTy, ..)), 5,022 ( 0.00%) QPath::TypeRelative(ty, _) if let TyKind::Path(qpath) = ty.kind => is_ty_alias(&qpath), 7,848 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_ty_alias'2 (558x) . QPath::TypeRelative(..) => false, . } 2,716 ( 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> { 26,840 ( 0.00%) match *path { 26,680 ( 0.00%) QPath::Resolved(_, path) => path.segments.last().expect("A path must have at least one segment"), . QPath::TypeRelative(_, seg) => seg, . } 13,096 ( 0.00%) } . . pub fn qpath_generic_tys<'tcx>(qpath: &QPath<'tcx>) -> impl Iterator> { 324 ( 0.00%) last_path_segment(qpath) . .args . .map_or(&[][..], |a| a.args) . .iter() 972 ( 0.00%) .filter_map(|a| match a { . GenericArg::Type(ty) => Some(ty.as_unambig_ty()), . _ => None, . }) 324 ( 0.00%) } . . /// If the expression is a path to a local (with optional projections), . /// returns the canonical `HirId` of the local. . /// . /// For example, `x.field[0].field2` would return the `HirId` of `x`. . pub fn path_to_local_with_projections(expr: &Expr<'_>) -> Option { . match expr.kind { . ExprKind::Field(recv, _) | ExprKind::Index(recv, _, _) => path_to_local_with_projections(recv), -- line 430 ---------------------------------------- -- line 448 ---------------------------------------- . /// impl std::ops::Add for Point { . /// type Output = Self; . /// . /// fn add(self, other: Self) -> Self { . /// Point(0, 0) . /// } . /// } . /// ``` 72,224 ( 0.00%) pub fn trait_ref_of_method<'tcx>(cx: &LateContext<'tcx>, owner: OwnerId) -> Option<&'tcx TraitRef<'tcx>> { 63,196 ( 0.00%) if let Node::Item(item) = cx.tcx.hir_node(cx.tcx.hir_owner_parent(owner)) 577,523 ( 0.02%) => ???:::hir_node (9,028x) 18,056 ( 0.00%) && let ItemKind::Impl(impl_) = &item.kind 9,028 ( 0.00%) && let Some(of_trait) = impl_.of_trait . { . return Some(&of_trait.trait_ref); . } . None 72,224 ( 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 544 ---------------------------------------- . sym::LinkedList, . sym::HashMap, . sym::BTreeMap, . sym::HashSet, . sym::BTreeSet, . sym::BinaryHeap, . ]; . 16 ( 0.00%) if let QPath::TypeRelative(_, method) = path 8 ( 0.00%) && method.ident.name == sym::new 40 ( 0.00%) && let Some(impl_did) = cx.tcx.impl_of_assoc(def_id) 2,212 ( 0.00%) => ???:::impl_of_assoc (5x) . && let Some(adt) = cx . .tcx . .type_of(impl_did) . .instantiate_identity() . .skip_norm_wip() . .ty_adt_def() . { 10 ( 0.00%) return Some(adt.did()) == cx.tcx.lang_items().string() 200 ( 0.00%) => ???:::lang_items (5x) 15 ( 0.00%) || (cx.tcx.get_diagnostic_name(adt.did())).is_some_and(|adt_name| std_types_symbols.contains(&adt_name)); 367 ( 0.00%) => ???:::get_diagnostic_name (5x) . } . false . } . . /// Returns true if the expr is equal to `Default::default` when evaluated. 90 ( 0.00%) pub fn is_default_equivalent_call( . cx: &LateContext<'_>, . repl_func: &Expr<'_>, . whole_call_expr: Option<&Expr<'_>>, . ) -> bool { 47 ( 0.00%) if let ExprKind::Path(ref repl_func_qpath) = repl_func.kind 63 ( 0.00%) && let Some(repl_def) = cx.qpath_res(repl_func_qpath, repl_func.hir_id).opt_def(cx) 702 ( 0.00%) => ???:::qpath_res (9x) 36 ( 0.00%) && (repl_def.assoc_fn_parent(cx).is_diag_item(cx, sym::Default) 8 ( 0.00%) || is_default_equivalent_ctor(cx, repl_def.1, repl_func_qpath)) . { . return true; . } . . // Get the type of the whole method call expression, find the exact method definition, look at . // its body and check if it is similar to the corresponding `Default::default()` body. 10 ( 0.00%) let Some(e) = whole_call_expr else { return false }; 30 ( 0.00%) let Some(default_fn_def_id) = cx.tcx.get_diagnostic_item(sym::default_fn) else { 530 ( 0.00%) => ???:::get_diagnostic_item (5x) . return false; . }; 50 ( 0.00%) let Some(ty) = cx.tcx.typeck(e.hir_id.owner.def_id).expr_ty_adjusted_opt(e) else { 695 ( 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:: (5x) 337 ( 0.00%) => ???:::expr_ty_adjusted_opt (5x) . return false; . }; 30 ( 0.00%) let args = rustc_ty::GenericArgs::for_item(cx.tcx, default_fn_def_id, |param, _| { 3,582 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:>::for_item:: (5x) 10 ( 0.00%) if let rustc_ty::GenericParamDefKind::Lifetime = param.kind { . cx.tcx.lifetimes.re_erased.into() 20 ( 0.00%) } else if param.index == 0 && param.name == kw::SelfUpper { 5 ( 0.00%) ty.into() . } else { . param.to_error(cx.tcx) . } . }); 55 ( 0.00%) let instance = rustc_ty::Instance::try_resolve(cx.tcx, cx.typing_env(), default_fn_def_id, args); 245,526 ( 0.01%) => ???:::try_resolve (5x) 150 ( 0.00%) => ???:::typing_env (5x) . 18 ( 0.00%) let Ok(Some(instance)) = instance else { return false }; 8 ( 0.00%) if let rustc_ty::InstanceKind::Item(def) = instance.def 6 ( 0.00%) && !cx.tcx.is_mir_available(def) . { . return false; . } 2 ( 0.00%) let ExprKind::Path(ref repl_func_qpath) = repl_func.kind else { . return false; . }; 12 ( 0.00%) let Some(repl_def_id) = cx.qpath_res(repl_func_qpath, repl_func.hir_id).opt_def_id() else { 156 ( 0.00%) => ???:::qpath_res (2x) . return false; . }; . . // Get the MIR Body for the `::default()` function. . // If it is a value or call (either fn or ctor), we compare its `DefId` against the one for the . // resolution of the expression we had in the path. This lets us identify, for example, that . // the body of ` as Default>::default()` is a `Vec::new()`, and the field was being . // initialized to `Vec::new()` as well. 4 ( 0.00%) let body = cx.tcx.instance_mir(instance.def); 26,343 ( 0.00%) => ???:::instance_mir (2x) . for block_data in body.basic_blocks.iter() { 8 ( 0.00%) if block_data.statements.len() == 1 4 ( 0.00%) && let StatementKind::Assign(assign) = &block_data.statements[0].kind . && assign.0.local == RETURN_PLACE . && let Rvalue::Aggregate(kind, _places) = &assign.1 . && let AggregateKind::Adt(did, variant_index, _, _, _) = **kind . && let def = cx.tcx.adt_def(did) . && let variant = &def.variant(variant_index) . && variant.fields.is_empty() . && let Some((_, did)) = variant.ctor . && did == repl_def_id . { . return true; 4 ( 0.00%) } else if block_data.statements.is_empty() . && let Some(term) = &block_data.terminator . { . match &term.kind { . TerminatorKind::Call { . func: Operand::Constant(c), . .. . } if let rustc_ty::FnDef(did, _args) = c.ty().kind() . && *did == repl_def_id => -- line 642 ---------------------------------------- -- line 651 ---------------------------------------- . { . return true; . }, . _ => {}, . } . } . } . false 72 ( 0.00%) } . . /// Returns true if the expr is equal to `Default::default()` of its type when evaluated. . /// . /// It doesn't cover all cases, like struct literals, but it is a close approximation. 338 ( 0.00%) pub fn is_default_equivalent(cx: &LateContext<'_>, e: &Expr<'_>) -> bool { 208 ( 0.00%) match &e.kind { . ExprKind::Lit(lit) => match lit.node { . LitKind::Bool(false) | LitKind::Int(Pu128(0), _) => true, . LitKind::Str(s, _) => s.is_empty(), . _ => false, . }, . ExprKind::Tup(items) | ExprKind::Array(items) => items.iter().all(|x| is_default_equivalent(cx, x)), . ExprKind::Repeat(x, len) => { . if let ConstArgKind::Anon(anon_const) = len.kind -- line 673 ---------------------------------------- -- line 676 ---------------------------------------- . && v <= 32 . && is_default_equivalent(cx, x) . { . true . } else { . false . } . }, 136 ( 0.00%) ExprKind::Call(repl_func, []) => is_default_equivalent_call(cx, repl_func, Some(e)), 568,254 ( 0.02%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_default_equivalent_call (9x) 2 ( 0.00%) ExprKind::Call(from_func, [arg]) => is_default_equivalent_from(cx, from_func, arg), 3 ( 0.00%) ExprKind::Path(qpath) => cx 15 ( 0.00%) .qpath_res(qpath, e.hir_id) 69 ( 0.00%) => ???:::qpath_res (3x) . .ctor_parent(cx) . .is_lang_item(cx, OptionNone), . ExprKind::AddrOf(rustc_hir::BorrowKind::Ref, _, expr) => matches!(expr.kind, ExprKind::Array([])), 3 ( 0.00%) ExprKind::Block(Block { stmts: [], expr, .. }, _) => expr.is_some_and(|e| is_default_equivalent(cx, e)), . _ => false, . } 136 ( 0.00%) } . . fn is_default_equivalent_from(cx: &LateContext<'_>, from_func: &Expr<'_>, arg: &Expr<'_>) -> bool { 9 ( 0.00%) if let ExprKind::Path(QPath::TypeRelative(ty, seg)) = from_func.kind 1 ( 0.00%) && seg.ident.name == sym::from . { . match arg.kind { . ExprKind::Lit(hir::Lit { . node: LitKind::Str(sym, _), . .. . }) => return sym.is_empty() && ty.basic_res().is_lang_item(cx, LangItem::String), . ExprKind::Array([]) => return ty.basic_res().is_diag_item(cx, sym::Vec), . ExprKind::Repeat(_, len) => { -- line 706 ---------------------------------------- -- line 743 ---------------------------------------- . /// `ignore_locals` set. The type `(usize, &mut String)` can have the second element moved, so it . /// isn't always safe to move into a closure when only a single field is needed. . /// . /// When called on the `continue` expression this will return false unless the outer loop expression . /// is in the `loop_ids` set. . /// . /// Note that this check is not recursive, so passing the `if` expression will always return true . /// even though sub-expressions might return false. 42 ( 0.00%) pub fn can_move_expr_to_closure_no_visit<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . loop_ids: &[HirId], . ignore_locals: &HirIdSet, . ) -> bool { 113 ( 0.00%) match expr.kind { . ExprKind::Break(Destination { target_id: Ok(id), .. }, _) . | ExprKind::Continue(Destination { target_id: Ok(id), .. }) . if loop_ids.contains(&id) => . { . true . }, . ExprKind::Break(..) . | ExprKind::Continue(_) -- line 765 ---------------------------------------- -- line 770 ---------------------------------------- . // partially moved. . ExprKind::Field( . &Expr { . hir_id, . kind: . ExprKind::Path(QPath::Resolved( . _, . Path { 2 ( 0.00%) res: Res::Local(local_id), . .. . }, . )), . .. . }, . _, 16 ( 0.00%) ) if !ignore_locals.contains(local_id) && can_partially_move_ty(cx, cx.typeck_results().node_type(hir_id)) => { 9,268 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::can_partially_move_ty (2x) 82 ( 0.00%) => ???:::node_type (2x) . // TODO: check if the local has been partially moved. Assume it has for now. . false . }, . _ => true, . } 56 ( 0.00%) } . . /// How a local is captured by a closure 106 ( 0.00%) #[derive(Debug, Clone, Copy, PartialEq, Eq)] . pub enum CaptureKind { . Value, . Use, . Ref(Mutability), . } . impl CaptureKind { . pub fn is_imm_ref(self) -> bool { . self == Self::Ref(Mutability::Not) -- line 802 ---------------------------------------- -- line 820 ---------------------------------------- . } . } . . /// Given an expression referencing a local, determines how it would be captured in a closure. . /// . /// Note as this will walk up to parent expressions until the capture can be determined it should . /// only be used while making a closure somewhere a value is consumed. e.g. a block, match arm, or . /// function argument (other than a receiver). 261 ( 0.00%) pub fn capture_local_usage(cx: &LateContext<'_>, e: &Expr<'_>) -> CaptureKind { . fn pat_capture_kind(cx: &LateContext<'_>, pat: &Pat<'_>) -> CaptureKind { . let mut capture = CaptureKind::Ref(Mutability::Not); . pat.each_binding_or_first(&mut |_, id, span, _| match cx . .typeck_results() . .extract_binding_mode(cx.sess(), id, span) . .0 . { . ByRef::No if !is_copy(cx, cx.typeck_results().node_type(id)) => { -- line 836 ---------------------------------------- -- line 847 ---------------------------------------- . debug_assert!(matches!( . e.kind, . ExprKind::Path(QPath::Resolved(None, Path { res: Res::Local(_), .. })) . )); . . let mut capture = CaptureKind::Value; . let mut capture_expr_ty = e; . 319 ( 0.00%) for (parent, child_id) in hir_parent_with_src_iter(cx.tcx, e.hir_id) { 100 ( 0.00%) if let [ . Adjustment { . kind: Adjust::Deref(_) | Adjust::Borrow(AutoBorrow::Ref(..)), . target, . }, . ref adjust @ .., 70 ( 0.00%) ] = *cx . .typeck_results() . .adjustments() . .get(child_id) . .map_or(&[][..], |x| &**x) 47 ( 0.00%) && let rustc_ty::RawPtr(_, mutability) | rustc_ty::Ref(_, _, mutability) = 14 ( 0.00%) *adjust.last().map_or(target, |a| a.target).kind() . { . return CaptureKind::Ref(mutability); . } . 78 ( 0.00%) match parent { 200 ( 0.00%) Node::Expr(e) => match e.kind { 2 ( 0.00%) ExprKind::AddrOf(_, mutability, _) => return CaptureKind::Ref(mutability), . ExprKind::Index(..) | ExprKind::Unary(UnOp::Deref, _) => capture = CaptureKind::Ref(Mutability::Not), 10 ( 0.00%) ExprKind::Assign(lhs, ..) | ExprKind::AssignOp(_, lhs, _) if lhs.hir_id == child_id => { . return CaptureKind::Ref(Mutability::Mut); . }, . ExprKind::Field(..) => { . if capture == CaptureKind::Value { . capture_expr_ty = e; . } . }, . ExprKind::Let(let_expr) => { -- line 885 ---------------------------------------- -- line 905 ---------------------------------------- . Node::LetStmt(l) => match pat_capture_kind(cx, l.pat) { . CaptureKind::Value | CaptureKind::Use => break, . capture @ CaptureKind::Ref(_) => return capture, . }, . _ => break, . } . } . 108 ( 0.00%) if capture == CaptureKind::Value && is_copy(cx, cx.typeck_results().expr_ty(capture_expr_ty)) { 720 ( 0.00%) => ???:::expr_ty (18x) . // Copy types are never automatically captured by value. . CaptureKind::Ref(Mutability::Not) . } else { . capture . } 261 ( 0.00%) } . . /// Checks if the expression can be moved into a closure as is. This will return a list of captures . /// if so, otherwise, `None`. 40 ( 0.00%) pub fn can_move_expr_to_closure<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option> { . struct V<'cx, 'tcx> { . cx: &'cx LateContext<'tcx>, . // Stack of potential break targets contained in the expression. . loops: Vec, . /// Local variables created in the expression. These don't need to be captured. . locals: HirIdSet, . /// Whether this expression can be turned into a closure. . allow_closure: bool, . /// Locals which need to be captured, and whether they need to be by value, reference, or . /// mutable reference. . captures: HirIdMap, . } . impl<'tcx> Visitor<'tcx> for V<'_, 'tcx> { 91 ( 0.00%) fn visit_expr(&mut self, e: &'tcx Expr<'_>) { 26 ( 0.00%) if !self.allow_closure { . return; . } . 70 ( 0.00%) match e.kind { 4 ( 0.00%) ExprKind::Path(QPath::Resolved(None, &Path { res: Res::Local(l), .. })) => { 1 ( 0.00%) if !self.locals.contains(&l) { 5 ( 0.00%) let cap = capture_local_usage(self.cx, e); 249 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::capture_local_usage (1x) 8 ( 0.00%) self.captures.entry(l).and_modify(|e| *e |= cap).or_insert(cap); 371 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map/entry.rs:>::or_insert (1x) 8 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map/entry.rs:>::and_modify::<::visit_expr::{closure#0}> (1x) . } . }, 7 ( 0.00%) ExprKind::Closure(closure) => { 35 ( 0.00%) for capture in self.cx.typeck_results().closure_min_captures_flattened(closure.def_id) { 234 ( 0.00%) => ???:::closure_min_captures_flattened (7x) 63 ( 0.00%) let local_id = match capture.place.base { . PlaceBase::Local(id) => id, . PlaceBase::Upvar(var) => var.var_path.hir_id, . _ => continue, . }; 7 ( 0.00%) if !self.locals.contains(&local_id) { 77 ( 0.00%) let capture = match capture.info.capture_kind { . UpvarCapture::ByValue => CaptureKind::Value, . UpvarCapture::ByUse => CaptureKind::Use, 14 ( 0.00%) UpvarCapture::ByRef(kind) => match kind { . BorrowKind::Immutable => CaptureKind::Ref(Mutability::Not), . BorrowKind::UniqueImmutable | BorrowKind::Mutable => { . CaptureKind::Ref(Mutability::Mut) . }, . }, . }; . self.captures . .entry(local_id) -- line 968 ---------------------------------------- -- line 972 ---------------------------------------- . } . }, . ExprKind::Loop(b, ..) => { . self.loops.push(e.hir_id); . self.visit_block(b); . self.loops.pop(); . }, . _ => { 24 ( 0.00%) self.allow_closure &= can_move_expr_to_closure_no_visit(self.cx, e, &self.loops, &self.locals); 12 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::can_move_expr_to_closure_no_visit (1x) 30 ( 0.00%) walk_expr(self, e); 10,118 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr:: (1x) . }, . } 80 ( 0.00%) } . . fn visit_pat(&mut self, p: &'tcx Pat<'tcx>) { . p.each_binding_or_first(&mut |_, id, _, _| { . self.locals.insert(id); . }); . } . } . 144 ( 0.00%) let mut v = V { . cx, . loops: Vec::new(), . locals: HirIdSet::default(), . allow_closure: true, . captures: HirIdMap::default(), . }; 16 ( 0.00%) v.visit_expr(expr); 13,841 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:::visit_expr (8x) 4 ( 0.00%) v.allow_closure.then_some(v.captures) 48 ( 0.00%) } . . /// Arguments of a method: the receiver and all the additional arguments. . pub type MethodArguments<'tcx> = Vec<(&'tcx Expr<'tcx>, &'tcx [Expr<'tcx>])>; . . /// Returns the method names and argument list of nested method call expressions that make up . /// `expr`. method/span lists are sorted with the most recent call first. 28 ( 0.00%) pub fn method_calls<'tcx>(expr: &'tcx Expr<'tcx>, max_depth: usize) -> (Vec, MethodArguments<'tcx>, Vec) { . let mut method_names = Vec::with_capacity(max_depth); . let mut arg_lists = Vec::with_capacity(max_depth); . let mut spans = Vec::with_capacity(max_depth); . . let mut current = expr; . for _ in 0..max_depth { 8 ( 0.00%) if let ExprKind::MethodCall(path, receiver, args, _) = ¤t.kind { . if receiver.span.from_expansion() || args.iter().any(|e| e.span.from_expansion()) { . break; . } . method_names.push(path.ident.name); . arg_lists.push((*receiver, &**args)); . spans.push(path.ident.span); . current = receiver; . } else { . break; . } . } . 56 ( 0.00%) (method_names, arg_lists, spans) 36 ( 0.00%) } . . /// 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()` 154,329 ( 0.00%) pub fn method_chain_args<'a>(expr: &'a Expr<'_>, methods: &[Symbol]) -> Option, &'a [Expr<'a>])>> { . let mut current = expr; . let mut matched = Vec::with_capacity(methods.len()); . for method_name in methods.iter().rev() { . // method chains are stored last -> first 47,460 ( 0.00%) if let ExprKind::MethodCall(path, receiver, args, _) = current.kind { 3,366 ( 0.00%) if path.ident.name == *method_name { 48 ( 0.00%) if receiver.span.from_expansion() || args.iter().any(|e| e.span.from_expansion()) { . return None; . } . matched.push((receiver, args)); // build up `matched` backwards . current = receiver; // go to parent expression . } else { . return None; . } . } else { . return None; . } . } . // Reverse `matched` so that it is in the same order as `methods`. . matched.reverse(); 132 ( 0.00%) Some(matched) 198,423 ( 0.01%) } . . /// Returns `true` if the provided `def_id` is an entrypoint to a program. 5,112 ( 0.00%) pub fn is_entrypoint_fn(cx: &LateContext<'_>, def_id: DefId) -> bool { 568 ( 0.00%) cx.tcx . .entry_fn(()) . .is_some_and(|(entry_fn_def_id, _)| def_id == entry_fn_def_id) 4,544 ( 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. 308 ( 0.00%) pub fn parent_item_name(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option { 264 ( 0.00%) let parent_id = cx.tcx.hir_get_parent_item(expr.hir_id).def_id; 836 ( 0.00%) => ???:::hir_get_parent_item (44x) 152 ( 0.00%) match cx.tcx.hir_node_by_def_id(parent_id) { 5 ( 0.00%) Node::Item(item) => item.kind.ident().map(|ident| ident.name), 39 ( 0.00%) Node::TraitItem(TraitItem { ident, .. }) | Node::ImplItem(ImplItem { ident, .. }) => Some(ident.name), . _ => None, . } 352 ( 0.00%) } . . pub struct ContainsName<'a, 'tcx> { . pub cx: &'a LateContext<'tcx>, . pub name: Symbol, . } . . impl<'tcx> Visitor<'tcx> for ContainsName<'_, 'tcx> { . type Result = ControlFlow<()>; -- line 1091 ---------------------------------------- -- line 1100 ---------------------------------------- . } . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { . self.cx.tcx . } . } . . /// Checks if an `Expr` contains a certain name. 1 ( 0.00%) pub fn contains_name<'tcx>(name: Symbol, expr: &'tcx Expr<'_>, cx: &LateContext<'tcx>) -> bool { 2 ( 0.00%) let mut cn = ContainsName { cx, name }; . cn.visit_expr(expr).is_break() 2 ( 0.00%) } . . /// Returns `true` if `expr` contains a return expression . pub fn contains_return<'tcx>(expr: impl Visitable<'tcx>) -> bool { . for_each_expr_without_closures(expr, |e| { 32 ( 0.00%) if matches!(e.kind, ExprKind::Ret(..)) { . ControlFlow::Break(()) . } else { . ControlFlow::Continue(()) . } . }) . .is_some() . } . . /// Gets the parent expression, if any –- this is useful to constrain a lint. 91,710 ( 0.00%) pub fn get_parent_expr<'tcx>(cx: &LateContext<'tcx>, e: &Expr<'_>) -> Option<&'tcx Expr<'tcx>> { 183,420 ( 0.01%) get_parent_expr_for_hir(cx, e.hir_id) 183,420 ( 0.01%) } . . /// This retrieves the parent for the given `HirId` if it's an expression. This is useful for . /// constraint lints 594 ( 0.00%) pub fn get_parent_expr_for_hir<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Expr<'tcx>> { 367,686 ( 0.01%) match cx.tcx.parent_hir_node(hir_id) { 972 ( 0.00%) => ???:::parent_hir_node (9x) . Node::Expr(parent) => Some(parent), . _ => None, . } 396 ( 0.00%) } . . /// Gets the enclosing block, if any. 532 ( 0.00%) pub fn get_enclosing_block<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Block<'tcx>> { 266 ( 0.00%) let enclosing_node = cx . .tcx 532 ( 0.00%) .hir_get_enclosing_scope(hir_id) 68,293 ( 0.00%) => ???:::hir_get_enclosing_scope (266x) 798 ( 0.00%) .map(|enclosing_id| cx.tcx.hir_node(enclosing_id)); 16,548 ( 0.00%) => ???:::hir_node (266x) 1,596 ( 0.00%) enclosing_node.and_then(|node| match node { . Node::Block(block) => Some(block), . Node::Item(&Item { . kind: ItemKind::Fn { body: eid, .. }, . .. . }) . | Node::ImplItem(&ImplItem { . kind: ImplItemKind::Fn(_, eid), . .. -- line 1153 ---------------------------------------- -- line 1156 ---------------------------------------- . kind: TraitItemKind::Fn(_, TraitFn::Provided(eid)), . .. . }) => match cx.tcx.hir_body(eid).value.kind { . ExprKind::Block(block, _) => Some(block), . _ => None, . }, . _ => None, . }) 798 ( 0.00%) } . . /// Returns the [`Closure`] enclosing `hir_id`, if any. . pub fn get_enclosing_closure<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId) -> Option<&'tcx Closure<'tcx>> { . cx.tcx.hir_parent_iter(hir_id).find_map(|(_, node)| { . if let Node::Expr(expr) = node . && let ExprKind::Closure(closure) = expr.kind . { . Some(closure) -- line 1172 ---------------------------------------- -- line 1203 ---------------------------------------- . Node::Stmt(_) | Node::Block(_) | Node::LetStmt(_) | Node::Arm(_) | Node::ExprField(_) => (), . _ => break, . } . } . None . } . . /// Gets the parent node if it's an impl block. 546 ( 0.00%) pub fn get_parent_as_impl(tcx: TyCtxt<'_>, id: HirId) -> Option<&Impl<'_>> { 3,822 ( 0.00%) match tcx.hir_parent_iter(id).next() { . Some(( . _, . Node::Item(Item { . kind: ItemKind::Impl(imp), . .. . }), . )) => Some(imp), . _ => None, . } 1,092 ( 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> { 10,977 ( 0.00%) while let ExprKind::Block( . Block { 2,763 ( 0.00%) stmts: [], . expr: Some(inner), . rules: BlockCheckMode::DefaultBlock, . .. . }, . _, 7,330 ( 0.00%) ) = expr.kind . { . expr = inner; . } . expr . } . . /// Removes blocks around an expression, only if the block contains just one expression . /// or just one expression statement with a semicolon. Unsafe blocks are not removed. -- line 1251 ---------------------------------------- -- line 1252 ---------------------------------------- . /// . /// Examples: . /// * `{}` -> `{}` . /// * `{ x }` -> `x` . /// * `{ x; }` -> `x` . /// * `{{ x; }}` -> `x` . /// * `{ x; y }` -> `{ x; y }` . /// * `{ unsafe { x } }` -> `unsafe { x }` 287 ( 0.00%) pub fn peel_blocks_with_stmt<'a>(mut expr: &'a Expr<'a>) -> &'a Expr<'a> { 10,879 ( 0.00%) while let ExprKind::Block( . Block { 8,300 ( 0.00%) stmts: [], . expr: Some(inner), . rules: BlockCheckMode::DefaultBlock, . .. . } . | Block { . stmts: . [ . Stmt { 729 ( 0.00%) kind: StmtKind::Expr(inner) | StmtKind::Semi(inner), . .. . }, . ], . expr: None, . rules: BlockCheckMode::DefaultBlock, . .. . }, . _, 5,572 ( 0.00%) ) = expr.kind . { 1,092 ( 0.00%) expr = inner; . } . expr 287 ( 0.00%) } . . /// Checks if the given expression is the else clause of either an `if` or `if let` expression. 9,354 ( 0.00%) pub fn is_else_clause(tcx: TyCtxt<'_>, expr: &Expr<'_>) -> bool { 6,236 ( 0.00%) let mut iter = tcx.hir_parent_iter(expr.hir_id); 7,682 ( 0.00%) match iter.next() { . Some(( . _, . Node::Expr(Expr { . kind: ExprKind::If(_, _, Some(else_expr)), . .. . }), . )) => else_expr.hir_id == expr.hir_id, . _ => false, . } 12,472 ( 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 { 1,952 ( 0.00%) if let ExprKind::Lit(spanned) = expr.kind 224 ( 0.00%) && let LitKind::Int(v, _) = spanned.node . { . return v == value; . } . false . } . . /// Checks whether the given expression is an untyped integer literal. . pub fn is_integer_literal_untyped(expr: &Expr<'_>) -> bool { -- line 1360 ---------------------------------------- -- line 1363 ---------------------------------------- . { . return suffix == LitIntType::Unsuffixed; . } . . false . } . . /// Checks whether the given expression is a constant literal of the given value. 762 ( 0.00%) pub fn is_float_literal(expr: &Expr<'_>, value: f64) -> bool { 616 ( 0.00%) if let ExprKind::Lit(spanned) = expr.kind . && let LitKind::Float(v, _) = spanned.node . { . v.as_str().parse() == Ok(value) . } else { . false . } 762 ( 0.00%) } . . /// Returns `true` if the given `Expr` has been coerced before. . /// . /// Examples of coercions can be found in the Nomicon at . /// . . /// . /// See `rustc_middle::ty::adjustment::Adjustment` and `rustc_hir_analysis::check::coercion` for . /// more information on adjustments and coercions. 780 ( 0.00%) pub fn is_adjusted(cx: &LateContext<'_>, e: &Expr<'_>) -> bool { 520 ( 0.00%) cx.typeck_results().adjustments().get(e.hir_id).is_some() 1,040 ( 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] 372,249 ( 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(); 44,505 ( 0.00%) let new_span = data.call_site; . 57,328 ( 0.00%) if let ExpnKind::Macro(MacroKind::Bang, mac_name) = data.kind . && mac_name == name . { 1,772 ( 0.00%) return Some(new_span); . } . . span = new_span; . } else { 42,908 ( 0.00%) return None; . } . } 197,073 ( 0.01%) } . . /// Returns the pre-expansion span if the span directly comes from an expansion . /// of the macro `name`. . /// The difference with [`is_expn_of`] is that in . /// ```no_run . /// # macro_rules! foo { ($name:tt!$args:tt) => { $name!$args } } . /// # macro_rules! bar { ($e:expr) => { $e } } . /// foo!(bar!(42)); . /// ``` . /// `42` is considered expanded from `foo!` and `bar!` by `is_expn_of` but only . /// from `bar!` by `is_direct_expn_of`. . #[must_use] 14,715 ( 0.00%) pub fn is_direct_expn_of(span: Span, name: Symbol) -> Option { . if span.from_expansion() { . let data = span.ctxt().outer_expn_data(); 9 ( 0.00%) let new_span = data.call_site; . 1,220 ( 0.00%) if let ExpnKind::Macro(MacroKind::Bang, mac_name) = data.kind . && mac_name == name . { 18 ( 0.00%) return Some(new_span); . } . } . 1,626 ( 0.00%) None 8,175 ( 0.00%) } . . /// Convenience function to get the return type of a function. 12,215 ( 0.00%) pub fn return_ty<'tcx>(cx: &LateContext<'tcx>, fn_def_id: OwnerId) -> Ty<'tcx> { 1,745 ( 0.00%) let ret_ty = cx.tcx.fn_sig(fn_def_id).instantiate_identity().skip_norm_wip().output(); 6,980 ( 0.00%) cx.tcx.instantiate_bound_regions_with_erased(ret_ty) 187,516 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased:: (1,745x) 12,215 ( 0.00%) } . . /// Convenience function to get the nth argument type of a function. . pub fn nth_arg<'tcx>(cx: &LateContext<'tcx>, fn_def_id: OwnerId, nth: usize) -> Ty<'tcx> { . let arg = cx . .tcx . .fn_sig(fn_def_id) . .instantiate_identity() . .skip_norm_wip() -- line 1453 ---------------------------------------- -- line 1467 ---------------------------------------- . _ => false, . }; . } . false . } . . /// Returns `true` if a pattern is refutable. . // TODO: should be implemented using rustc/mir_build/thir machinery 350 ( 0.00%) pub fn is_refutable(cx: &LateContext<'_>, pat: &Pat<'_>) -> bool { . fn is_qpath_refutable(cx: &LateContext<'_>, qpath: &QPath<'_>, id: HirId) -> bool { 28 ( 0.00%) !matches!( 46 ( 0.00%) cx.qpath_res(qpath, id), 69 ( 0.00%) => ???:::qpath_res (3x) . Res::Def(DefKind::Struct, ..) | Res::Def(DefKind::Ctor(def::CtorOf::Struct, _), _) . ) . } . . fn are_refutable<'a, I: IntoIterator>>(cx: &LateContext<'_>, i: I) -> bool { 54 ( 0.00%) i.into_iter().any(|pat| is_refutable(cx, pat)) 505 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_refutable'2 (12x) . } . 267 ( 0.00%) match pat.kind { . PatKind::Missing => unreachable!(), . PatKind::Wild | PatKind::Never => false, // If `!` typechecked then the type is empty, so not refutable. 23 ( 0.00%) PatKind::Binding(_, _, _, pat) => pat.is_some_and(|pat| is_refutable(cx, pat)), 2 ( 0.00%) PatKind::Box(pat) | PatKind::Ref(pat, _, _) => is_refutable(cx, pat), . PatKind::Expr(PatExpr { 2 ( 0.00%) kind: PatExprKind::Path(qpath), . hir_id, . .. 4 ( 0.00%) }) => is_qpath_refutable(cx, qpath, *hir_id), 3 ( 0.00%) PatKind::Or(pats) => { . // TODO: should be the honest check, that pats is exhaustive set . are_refutable(cx, pats) . }, 6 ( 0.00%) PatKind::Tuple(pats, _) => are_refutable(cx, pats), 2 ( 0.00%) PatKind::Struct(ref qpath, fields, _) => { 2 ( 0.00%) is_qpath_refutable(cx, qpath, pat.hir_id) || are_refutable(cx, fields.iter().map(|field| field.pat)) . }, 9 ( 0.00%) PatKind::TupleStruct(ref qpath, pats, _) => { 15 ( 0.00%) is_qpath_refutable(cx, qpath, pat.hir_id) || are_refutable(cx, pats) . }, . PatKind::Slice(head, middle, tail) => { . match &cx.typeck_results().node_type(pat.hir_id).kind() { . rustc_ty::Slice(..) => { . // [..] is the only irrefutable slice pattern. . !head.is_empty() || middle.is_none() || !tail.is_empty() . }, . rustc_ty::Array(..) => are_refutable(cx, head.iter().chain(middle).chain(tail.iter())), -- line 1514 ---------------------------------------- -- line 1515 ---------------------------------------- . _ => { . // unreachable!() . true . }, . } . }, . PatKind::Expr(..) | PatKind::Range(..) | PatKind::Err(_) | PatKind::Deref(_) | PatKind::Guard(..) => true, . } 280 ( 0.00%) } . . /// If the pattern is an `or` pattern, call the function once for each sub pattern. Otherwise, call . /// the function once on the given pattern. . pub fn recurse_or_patterns<'tcx, F: FnMut(&'tcx Pat<'tcx>)>(pat: &'tcx Pat<'tcx>, mut f: F) { 74 ( 0.00%) if let PatKind::Or(pats) = pat.kind { . pats.iter().for_each(f); . } else { 74 ( 0.00%) f(pat); 4,897 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/match_wild_enum.rs:clippy_lints::matches::match_wild_enum::check::{closure#2} (37x) . } . } . . pub fn is_self(slf: &Param<'_>) -> bool { . if let PatKind::Binding(.., name, _) = slf.pat.kind { . name.name == kw::SelfLower . } else { . false -- line 1539 ---------------------------------------- -- line 1545 ---------------------------------------- . && let Res::SelfTyParam { .. } | Res::SelfTyAlias { .. } = path.res . { . return true; . } . false . } . . pub fn iter_input_pats<'tcx>(decl: &FnDecl<'_>, body: &'tcx Body<'_>) -> impl Iterator> { 18,727 ( 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 1607 ---------------------------------------- . /// . /// To emit at a lint at a different context than the one current see . /// [`span_lint_hir`](diagnostics::span_lint_hir) or . /// [`span_lint_hir_and_then`](diagnostics::span_lint_hir_and_then) . pub fn fulfill_or_allowed(cx: &LateContext<'_>, lint: &'static Lint, ids: impl IntoIterator) -> bool { . let mut suppress_lint = false; . . for id in ids { 219 ( 0.00%) let level_spec = cx.tcx.lint_level_spec_at_node(lint, id); 7,464 ( 0.00%) => ???:::lint_level_spec_at_node (9x) 152 ( 0.00%) if let Some(expectation) = level_spec.lint_id() { . cx.fulfill_expectation(expectation); . } . 38 ( 0.00%) match level_spec.level() { . Level::Allow | Level::Expect => suppress_lint = true, . Level::Warn | Level::ForceWarn | Level::Deny | Level::Forbid => {}, . } . } . . suppress_lint . } . . /// 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. 73,120 ( 0.00%) pub fn is_lint_allowed(cx: &LateContext<'_>, lint: &'static Lint, id: HirId) -> bool { 36,560 ( 0.00%) cx.tcx.lint_level_spec_at_node(lint, id).is_allow() 17,128,508 ( 0.47%) => ???:::lint_level_spec_at_node (18,280x) 36,560 ( 0.00%) } . . pub fn strip_pat_refs<'hir>(mut pat: &'hir Pat<'hir>) -> &'hir Pat<'hir> { 35 ( 0.00%) while let PatKind::Ref(subpat, _, _) = pat.kind { . pat = subpat; . } . pat . } . 8 ( 0.00%) pub fn int_bits(tcx: TyCtxt<'_>, ity: IntTy) -> u64 { . Integer::from_int_ty(&tcx, ity).size().bits() 16 ( 0.00%) } . . #[expect(clippy::cast_possible_wrap)] . /// Turn a constant int byte representation into an i128 1 ( 0.00%) pub fn sext(tcx: TyCtxt<'_>, u: u128, ity: IntTy) -> i128 { . let amt = 128 - int_bits(tcx, ity); 51 ( 0.00%) ((u as i128) << amt) >> amt 3 ( 0.00%) } . . #[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 411 ( 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; 3,699 ( 0.00%) (u << amt) >> amt 1,233 ( 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. 318,458 ( 0.01%) pub fn in_automatically_derived(tcx: TyCtxt<'_>, id: HirId) -> bool { . tcx.hir_parent_owner_iter(id) 606,176 ( 0.02%) .filter(|(_, node)| matches!(node, OwnerNode::Item(item) if matches!(item.kind, ItemKind::Impl(_)))) 84,572 ( 0.00%) .any(|(id, _)| find_attr!(tcx, id.def_id, AutomaticallyDerived)) 3,519,130 ( 0.10%) => ???:>::get_attrs (37,485x) 318,458 ( 0.01%) } . . /// Checks if the given `DefId` matches the `libc` item. 17,360 ( 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. 5,208 ( 0.00%) cx.tcx.crate_name(did.krate) == sym::libc && cx.tcx.def_path_str(did).ends_with(name.as_str()) 13,888 ( 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 }`. 7,280 ( 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,045 ( 0.00%) if let ExprKind::Block(block, _) = then.kind { . blocks.push(block); . } else { . panic!("ExprKind::If node is not an ExprKind::Block"); . } . 2,030 ( 0.00%) if let Some(else_expr) = r#else { . expr = else_expr; . } else { . break; . } . } . . // final `else {..}` 910 ( 0.00%) if !blocks.is_empty() 1,995 ( 0.00%) && let ExprKind::Block(block, _) = expr.kind . { . blocks.push(block); . } . 10,920 ( 0.00%) (conds, blocks) 8,190 ( 0.00%) } . . /// Peels away all the compiler generated code surrounding the body of an async closure. . pub fn get_async_closure_expr<'tcx>(tcx: TyCtxt<'tcx>, expr: &Expr<'_>) -> Option<&'tcx Expr<'tcx>> { . if let ExprKind::Closure(&Closure { . body, . kind: hir::ClosureKind::Coroutine(CoroutineKind::Desugared(CoroutineDesugaring::Async, _)), . .. . }) = expr.kind -- line 1748 ---------------------------------------- -- line 1765 ---------------------------------------- . } . . /// Peels away all the compiler generated code surrounding the body of an async function, . pub fn get_async_fn_body<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'_>) -> Option<&'tcx Expr<'tcx>> { . get_async_closure_expr(tcx, body.value) . } . . // check if expr is calling method or function with #[must_use] attribute 21 ( 0.00%) pub fn is_must_use_func_call(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 31 ( 0.00%) let did = match expr.kind { 2 ( 0.00%) ExprKind::Call(path, _) => { 6 ( 0.00%) if let ExprKind::Path(ref qpath) = path.kind 18 ( 0.00%) && let Res::Def(_, did) = cx.qpath_res(qpath, path.hir_id) 46 ( 0.00%) => ???:::qpath_res (2x) . { . Some(did) . } else { . None . } . }, 8 ( 0.00%) ExprKind::MethodCall(..) => cx.typeck_results().type_dependent_def_id(expr.hir_id), 102 ( 0.00%) => ???:::type_dependent_def_id (2x) . _ => None, . }; . 1,422 ( 0.00%) did.is_some_and(|did| find_attr!(cx.tcx, did, MustUse { .. })) 411 ( 0.00%) => ???:>::get_attrs (4x) 21 ( 0.00%) } . . /// Checks if a function's body represents the identity function. Looks for bodies of the form: . /// * `|x| x` . /// * `|x| return x` . /// * `|x| { return x }` . /// * `|x| { return x; }` . /// * `|(x, y)| (x, y)` . /// * `|[x, y]| [x, y]` . /// * `|Foo(bar, baz)| Foo(bar, baz)` . /// * `|Foo { bar, baz }| Foo { bar, baz }` . /// * `|x| { let y = x; ...; let z = y; z }` . /// * `|x| { let y = x; ...; let z = y; return z }` . /// . /// Consider calling [`is_expr_untyped_identity_function`] or [`is_expr_identity_function`] instead. 1,169 ( 0.00%) fn is_body_identity_function<'hir>(cx: &LateContext<'_>, func: &Body<'hir>) -> bool { 501 ( 0.00%) let [param] = func.params else { . return false; . }; . 167 ( 0.00%) let mut param_pat = param.pat; . . // Given a sequence of `Stmt`s of the form `let p = e` where `e` is an expr identical to the . // current `param_pat`, advance the current `param_pat` to `p`. . // . // Note: This is similar to `clippy_utils::get_last_chain_binding_hir_id`, but it works . // directly over a `Pattern` rather than a `HirId`. And it checks for compatibility via . // `is_expr_identity_of_pat` rather than `HirId` equality . let mut advance_param_pat_over_stmts = |stmts: &[Stmt<'hir>]| { . for stmt in stmts { 24 ( 0.00%) if let StmtKind::Let(local) = stmt.kind 24 ( 0.00%) && let Some(init) = local.init 40 ( 0.00%) && is_expr_identity_of_pat(cx, param_pat, init, true) 736 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expr_identity_of_pat (8x) . { . param_pat = local.pat; . } else { . return false; . } . } . . true . }; . 167 ( 0.00%) let mut expr = func.value; . loop { 887 ( 0.00%) match expr.kind { . ExprKind::Block( . &Block { 76 ( 0.00%) stmts: [], . expr: Some(e), . .. . }, . _, . ) . | ExprKind::Ret(Some(e)) => expr = e, . ExprKind::Block( . &Block { 16 ( 0.00%) stmts: [stmt], . expr: None, . .. . }, . _, . ) => { . if let StmtKind::Semi(e) | StmtKind::Expr(e) = stmt.kind . && let ExprKind::Ret(Some(ret_val)) = e.kind . { . expr = ret_val; . } else { . return false; . } . }, . ExprKind::Block( . &Block { 8 ( 0.00%) stmts, expr: Some(e), .. . }, . _, . ) => { . if !advance_param_pat_over_stmts(stmts) { . return false; . } . . expr = e; -- line 1870 ---------------------------------------- -- line 1875 ---------------------------------------- . && let StmtKind::Semi(e) | StmtKind::Expr(e) = last_stmt.kind . && let ExprKind::Ret(Some(ret_val)) = e.kind . { . expr = ret_val; . } else { . return false; . } . }, 1,590 ( 0.00%) _ => return is_expr_identity_of_pat(cx, param_pat, expr, true), 14,015 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expr_identity_of_pat (159x) . } . } 72 ( 0.00%) } . . /// Checks if the given expression is an identity representation of the given pattern: . /// * `x` is the identity representation of `x` . /// * `(x, y)` is the identity representation of `(x, y)` . /// * `[x, y]` is the identity representation of `[x, y]` . /// * `Foo(bar, baz)` is the identity representation of `Foo(bar, baz)` . /// * `Foo { bar, baz }` is the identity representation of `Foo { bar, baz }` . /// . /// Note that `by_hir` is used to determine bindings are checked by their `HirId` or by their name. . /// This can be useful when checking patterns in `let` bindings or `match` arms. 1,503 ( 0.00%) pub fn is_expr_identity_of_pat(cx: &LateContext<'_>, pat: &Pat<'_>, expr: &Expr<'_>, by_hir: bool) -> bool { 124 ( 0.00%) if cx . .typeck_results() . .pat_binding_modes() 334 ( 0.00%) .get(pat.hir_id) 124 ( 0.00%) .is_some_and(|mode| matches!(mode.0, ByRef::Yes(..))) . { . // If the parameter is `(x, y)` of type `&(T, T)`, or `[x, y]` of type `&[T; 2]`, then . // due to match ergonomics, the inner patterns become references. Don't consider this . // the identity function as that changes types. . return false; . } . . // NOTE: we're inside a (function) body, so this won't ICE . let qpath_res = |qpath, hir| cx.typeck_results().qpath_res(qpath, hir); . 1,935 ( 0.00%) match (pat.kind, expr.kind) { 248 ( 0.00%) (PatKind::Binding(_, id, _, _), _) if by_hir => { . expr.res_local_id() == Some(id) && cx.typeck_results().expr_adjustments(expr).is_empty() . }, . (PatKind::Binding(_, _, ident, _), ExprKind::Path(QPath::Resolved(_, path))) => { . matches!(path.segments, [ segment] if segment.ident.name == ident.name) . }, . (PatKind::Tuple(pats, dotdot), ExprKind::Tup(tup)) . if dotdot.as_opt_usize().is_none() && pats.len() == tup.len() => . { -- line 1922 ---------------------------------------- -- line 1946 ---------------------------------------- . qpath_res(&pat_ident, pat.hir_id) == qpath_res(ident, expr.hir_id) . // check fields . && unordered_over(field_pats, fields, |field_pat, field| { . field_pat.ident == field.ident && is_expr_identity_of_pat(cx, field_pat.pat, field.expr, by_hir) . }) . }, . _ => false, . } 1,336 ( 0.00%) } . . /// This is the same as [`is_expr_identity_function`], but does not consider closures . /// with type annotations for its bindings (or similar) as identity functions: . /// * `|x: u8| x` . /// * `std::convert::identity::` 143 ( 0.00%) pub fn is_expr_untyped_identity_function(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 715 ( 0.00%) match expr.kind { 372 ( 0.00%) ExprKind::Closure(&Closure { body, fn_decl, .. }) 372 ( 0.00%) if fn_decl.inputs.iter().all(|ty| matches!(ty.kind, TyKind::Infer(()))) => . { 868 ( 0.00%) is_body_identity_function(cx, cx.tcx.hir_body(body)) 14,934 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_body_identity_function (124x) 10,145 ( 0.00%) => ???:::hir_body (124x) . }, . ExprKind::Path(QPath::Resolved(_, path)) 10 ( 0.00%) if path.segments.iter().all(|seg| seg.infer_args) 8 ( 0.00%) && let Some(did) = path.res.opt_def_id() => . { 16 ( 0.00%) cx.tcx.is_diagnostic_item(sym::convert_identity, did) 216 ( 0.00%) => ???:::is_diagnostic_item (4x) . }, . _ => false, . } 45 ( 0.00%) } . . /// Checks if an expression represents the identity function . /// Only examines closures and `std::convert::identity` . /// . /// NOTE: If you want to use this function to find out if a closure is unnecessary, you likely want . /// to call [`is_expr_untyped_identity_function`] instead, which makes sure that the closure doesn't . /// have type annotations. This is important because removing a closure with bindings can . /// remove type information that helped type inference before, which can then lead to compile . /// errors. . pub fn is_expr_identity_function(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 135 ( 0.00%) match expr.kind { 473 ( 0.00%) ExprKind::Closure(&Closure { body, .. }) => is_body_identity_function(cx, cx.tcx.hir_body(body)), 5,294 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_body_identity_function (43x) 3,433 ( 0.00%) => ???:::hir_body (43x) 4 ( 0.00%) _ => 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. 26,704 ( 0.00%) pub fn get_expr_use_or_unification_node<'tcx>(tcx: TyCtxt<'tcx>, expr: &Expr<'_>) -> Option<(Node<'tcx>, HirId)> { 30,042 ( 0.00%) for (node, child_id) in hir_parent_with_src_iter(tcx, expr.hir_id) { 8,182 ( 0.00%) match node { . Node::Block(_) => {}, 3 ( 0.00%) Node::Arm(arm) if arm.body.hir_id == child_id => {}, 13,209 ( 0.00%) Node::Expr(expr) => match expr.kind { . ExprKind::Block(..) | ExprKind::DropTemps(_) => {}, 68 ( 0.00%) ExprKind::Match(_, [arm], _) if arm.hir_id == child_id => {}, 68 ( 0.00%) ExprKind::If(_, then_expr, None) if then_expr.hir_id == child_id => return None, 3,093 ( 0.00%) _ => return Some((Node::Expr(expr), child_id)), . }, 490 ( 0.00%) node => return Some((node, child_id)), . } . } . None 26,704 ( 0.00%) } . . /// Checks if the result of an expression is used, or it's type is unified with another branch. 48 ( 0.00%) pub fn is_expr_used_or_unified(tcx: TyCtxt<'_>, expr: &Expr<'_>) -> bool { 48 ( 0.00%) !matches!( 24 ( 0.00%) get_expr_use_or_unification_node(tcx, expr), 2,874 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_or_unification_node (12x) . None | Some(( . Node::Stmt(Stmt { . kind: StmtKind::Expr(_) . | StmtKind::Semi(_) . | StmtKind::Let(LetStmt { . pat: Pat { . kind: PatKind::Wild, . .. -- line 2022 ---------------------------------------- -- line 2023 ---------------------------------------- . }, . .. . }), . .. . }), . _ . )) . ) 24 ( 0.00%) } . . /// Checks if the expression is the final expression returned from a block. 1,838 ( 0.00%) pub fn is_expr_final_block_expr(tcx: TyCtxt<'_>, expr: &Expr<'_>) -> bool { 6,433 ( 0.00%) matches!(tcx.parent_hir_node(expr.hir_id), Node::Block(..)) 99,588 ( 0.00%) => ???:::parent_hir_node (919x) 1,838 ( 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(_)))) . }) . } . 13 ( 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") . } 26 ( 0.00%) } . 2 ( 0.00%) pub fn is_no_std_crate(cx: &LateContext<'_>) -> bool { 284 ( 0.00%) find_attr!(cx.tcx, crate, NoStd) 110 ( 0.00%) => ???:::hir_krate_attrs (2x) 6 ( 0.00%) } . . pub fn is_no_core_crate(cx: &LateContext<'_>) -> bool { 195 ( 0.00%) find_attr!(cx.tcx, crate, NoCore) 715 ( 0.00%) => ???:::hir_krate_attrs (13x) . } . . /// 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() {} . /// } . /// ``` 17,457 ( 0.00%) pub fn is_trait_impl_item(cx: &LateContext<'_>, hir_id: HirId) -> bool { 28,807 ( 0.00%) if let Node::Item(item) = cx.tcx.parent_hir_node(hir_id) { 736,776 ( 0.02%) => ???:::parent_hir_node (5,819x) 21,618 ( 0.00%) matches!(item.kind, ItemKind::Impl(Impl { of_trait: Some(_), .. })) . } else { . false . } 11,638 ( 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 {} . /// } . /// ``` 9 ( 0.00%) pub fn fn_has_unsatisfiable_clauses(cx: &LateContext<'_>, did: DefId) -> bool { . use rustc_trait_selection::traits; 1 ( 0.00%) let clauses = cx . .tcx . .clauses_of(did) . .clauses . .iter() . .filter_map(|(p, _)| if p.is_global() { Some(*p) } else { None }); 9 ( 0.00%) traits::impossible_clauses(cx.tcx, traits::elaborate(cx.tcx, clauses).collect::>()) 399 ( 0.00%) => ???:rustc_trait_selection::traits::impossible_clauses (1x) 42 ( 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/elaborate.rs:rustc_type_ir::elaborate::elaborate::, clippy_utils::fn_has_unsatisfiable_clauses::{closure#0}>> (1x) 8 ( 0.00%) } . . /// Returns the `DefId` of the callee if the given expression is a function or method call. 172,696 ( 0.00%) pub fn fn_def_id(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option { 43,180 ( 0.00%) fn_def_id_with_node_args(cx, expr).map(|(did, _)| did) 2,042,943 ( 0.06%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id_with_node_args (43,174x) 86,348 ( 0.00%) } . . /// Returns the `DefId` of the callee if the given expression is a function or method call, . /// as well as its node args. 302,309 ( 0.01%) pub fn fn_def_id_with_node_args<'tcx>( . cx: &LateContext<'tcx>, . expr: &Expr<'_>, . ) -> Option<(DefId, GenericArgsRef<'tcx>)> { . let typeck = cx.typeck_results(); 218,727 ( 0.01%) match &expr.kind { 18,819 ( 0.00%) ExprKind::MethodCall(..) => Some(( 37,638 ( 0.00%) typeck.type_dependent_def_id(expr.hir_id)?, 320,723 ( 0.01%) => ???:::type_dependent_def_id (6,273x) 25,092 ( 0.00%) typeck.node_args(expr.hir_id), 228,923 ( 0.01%) => ???:::node_args (6,273x) 8,931 ( 0.00%) )), . ExprKind::Call( . Expr { 2,788 ( 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 13,550 ( 0.00%) if let Res::Def(DefKind::Fn | DefKind::Ctor(..) | DefKind::AssocFn, id) = 27,230 ( 0.00%) typeck.qpath_res(qpath, *path_hir_id) 95,944 ( 0.00%) => ???:::qpath_res (2,788x) . { 15,948 ( 0.00%) Some((id, typeck.node_args(*path_hir_id))) 96,184 ( 0.00%) => ???:::node_args (2,658x) . } else { . None . } . }, . _ => None, . } 388,683 ( 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. 5 ( 0.00%) pub fn is_slice_of_primitives(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option { 3 ( 0.00%) let expr_type = cx.typeck_results().expr_ty_adjusted(expr); 53 ( 0.00%) => ???:::expr_ty_adjusted (1x) . let expr_kind = expr_type.kind(); 5 ( 0.00%) let is_primitive = match expr_kind { . rustc_ty::Slice(element_type) => is_recursively_primitive_type(*element_type), 3 ( 0.00%) rustc_ty::Ref(_, inner_ty, _) if matches!(inner_ty.kind(), &rustc_ty::Slice(_)) => { . if let rustc_ty::Slice(element_type) = inner_ty.kind() { 2 ( 0.00%) is_recursively_primitive_type(*element_type) 21 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_recursively_primitive_type (1x) . } else { . unreachable!() . } . }, . _ => false, . }; . 2 ( 0.00%) if is_primitive { . // if we have wrappers like Array, Slice or Tuple, print these . // and get the type enclosed in the slice ref . match expr_type.peel_refs().walk().nth(1).unwrap().expect_ty().kind() { . rustc_ty::Slice(..) => return Some("slice".into()), . rustc_ty::Array(..) => return Some("array".into()), . rustc_ty::Tuple(..) => return Some("tuple".into()), . _ => { . // is_recursively_primitive_type() should have taken care . // of the rest and we can rely on the type that is found . let refs_peeled = expr_type.peel_refs(); . return Some(refs_peeled.walk().last().unwrap().to_string()); . }, . } . } 1 ( 0.00%) None 6 ( 0.00%) } . . /// 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)` 19,110 ( 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 { 4,841 ( 0.00%) [a, b] if eq(a, b) => return vec![vec![a, b]], 3,512 ( 0.00%) _ if exprs.len() <= 2 => return vec![], . _ => {}, . } . . let mut buckets: UnindexMap>> = UnindexMap::default(); . . for expr in exprs { 158 ( 0.00%) match buckets.entry(hash(expr)) { . indexmap::map::Entry::Occupied(mut o) => { . let bucket = o.get_mut(); 60 ( 0.00%) match bucket.iter_mut().find(|group| eq(expr, group[0])) { . Some(group) => group.push(expr), 21 ( 0.00%) None => bucket.push(vec![expr]), . } . }, . indexmap::map::Entry::Vacant(v) => { 720 ( 0.00%) v.insert(vec![vec![expr]]); 72 ( 0.00%) }, . } . } . . buckets . .into_values() . .flatten() 158 ( 0.00%) .filter(|group| group.len() > 1) . .collect() 16,380 ( 0.00%) } . . /// Peels off all references on the pattern. Returns the underlying pattern and the number of . /// references removed. 471 ( 0.00%) pub fn peel_hir_pat_refs<'a>(pat: &'a Pat<'a>) -> (&'a Pat<'a>, usize) { . fn peel<'a>(pat: &'a Pat<'a>, count: usize) -> (&'a Pat<'a>, usize) { 942 ( 0.00%) if let PatKind::Ref(pat, _, _) = pat.kind { . peel(pat, count + 1) . } else { . (pat, count) . } . } . peel(pat, 0) 471 ( 0.00%) } . . /// Peels of expressions while the given closure returns `Some`. 1,488 ( 0.00%) pub fn peel_hir_expr_while<'tcx>( . mut expr: &'tcx Expr<'tcx>, . mut f: impl FnMut(&'tcx Expr<'tcx>) -> Option<&'tcx Expr<'tcx>>, . ) -> &'tcx Expr<'tcx> { 152 ( 0.00%) while let Some(e) = f(expr) { . expr = e; . } . expr 1,674 ( 0.00%) } . . /// Peels off up to the given number of references on the expression. Returns the underlying . /// expression and the number of references removed. . pub fn peel_n_hir_expr_refs<'a>(expr: &'a Expr<'a>, count: usize) -> (&'a Expr<'a>, usize) { . let mut remaining = count; . let e = peel_hir_expr_while(expr, |e| match e.kind { . ExprKind::AddrOf(ast::BorrowKind::Ref, _, e) if remaining != 0 => { . remaining -= 1; -- line 2253 ---------------------------------------- -- line 2267 ---------------------------------------- . count = count.wrapping_add(1); . curr_expr = local_expr; . } . (curr_expr, count) . } . . /// Peels off all references on the expression. Returns the underlying expression and the number of . /// references removed. 136,482 ( 0.00%) pub fn peel_hir_expr_refs<'a>(expr: &'a Expr<'a>) -> (&'a Expr<'a>, usize) { . let mut count = 0; 147,518 ( 0.00%) let e = peel_hir_expr_while(expr, |e| match e.kind { 2,759 ( 0.00%) ExprKind::AddrOf(ast::BorrowKind::Ref, _, e) => { 2,759 ( 0.00%) count += 1; . Some(e) . }, . _ => None, . }); . (e, count) 68,241 ( 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. 1,188 ( 0.00%) pub fn peel_ref_operators<'hir>(cx: &LateContext<'_>, mut expr: &'hir Expr<'hir>) -> &'hir Expr<'hir> { . loop { 553 ( 0.00%) match expr.kind { . ExprKind::AddrOf(_, _, e) => expr = e, 152 ( 0.00%) ExprKind::Unary(UnOp::Deref, e) if cx.typeck_results().expr_ty(e).is_ref() => expr = e, 200 ( 0.00%) => ???:::expr_ty (5x) . _ => break, . } . } . expr 660 ( 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 . } . 35 ( 0.00%) pub fn is_hir_ty_cfg_dependant(cx: &LateContext<'_>, ty: &hir::Ty<'_>) -> bool { 175 ( 0.00%) if let TyKind::Path(QPath::Resolved(_, path)) = ty.kind 78 ( 0.00%) && let Res::Def(_, def_id) = path.res . { 412 ( 0.00%) return find_attr!(cx.tcx, def_id, CfgTrace(..) | CfgAttrTrace(..)); 502 ( 0.00%) => ???:>::get_attrs (4x) . } . false 35 ( 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. 9,050 ( 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) { 3,870 ( 0.00%) if matches!(tcx.def_kind(id.owner_id), DefKind::Const { .. }) 66 ( 0.00%) && let item = tcx.hir_item(id) 1,386 ( 0.00%) => ???:::hir_item (22x) 66 ( 0.00%) && let ItemKind::Const(ident, _generics, ty, _body) = item.kind 104 ( 0.00%) && let TyKind::Path(QPath::Resolved(_, path)) = ty.kind . // We could also check for the type name `test::TestDescAndFn` 44 ( 0.00%) && let Res::Def(DefKind::Struct, _) = path.res 12 ( 0.00%) && find_attr!(tcx, item.hir_id(), RustcTestMarker(..)) 128 ( 0.00%) => ???:>::get_attrs (2x) . { . names.push(ident.name); . } . } . names.sort_unstable(); 152 ( 0.00%) entry.insert(names).clone() . }, . } 7,240 ( 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 6,335 ( 0.00%) pub fn is_in_test_function(tcx: TyCtxt<'_>, id: HirId) -> bool { 3,620 ( 0.00%) let names = test_item_names(tcx, tcx.parent_module(id)); 1,170,598 ( 0.03%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::test_item_names (905x) 117,710 ( 0.00%) => ???:::parent_module (905x) . // Without `--test` there are no test items, so the parent walk can never match. 905 ( 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 . }) 5,430 ( 0.00%) } . . /// Checks if `fn_def_id` has a `#[test]` attribute applied . /// . /// This only checks directly applied attributes. To see if a node has a parent function marked with . /// `#[test]` use [`is_in_test_function`]. . /// . /// Note: Add `//@compile-flags: --test` to UI tests with a `#[test]` function . pub fn is_test_function(tcx: TyCtxt<'_>, fn_def_id: LocalDefId) -> bool { -- line 2410 ---------------------------------------- -- line 2419 ---------------------------------------- . false . } . } . . /// Checks if `id` has a `#[cfg(test)]` attribute applied . /// . /// This only checks directly applied attributes, to see if a node is inside a `#[cfg(test)]` parent . /// use [`is_in_cfg_test`] 18 ( 0.00%) pub fn is_cfg_test(tcx: TyCtxt<'_>, id: HirId) -> bool { 41,688 ( 0.00%) if let Some(cfgs) = find_attr!(tcx, id, CfgTrace(cfgs) => cfgs) 440,460 ( 0.01%) => ???:>::get_attrs (6,058x) . && cfgs . .iter() 1,330 ( 0.00%) .any(|(cfg, _)| matches!(cfg, CfgEntry::NameValue { name: sym::test, .. })) . { . true . } else { . false . } 12 ( 0.00%) } . . /// Checks if any parent node of `HirId` has `#[cfg(test)]` attribute applied . pub fn is_in_cfg_test(tcx: TyCtxt<'_>, id: HirId) -> bool { . tcx.hir_parent_id_iter(id).any(|parent_id| is_cfg_test(tcx, parent_id)) . } . . /// Checks if the node is in a `#[test]` function or has any parent node marked `#[cfg(test)]` 9,050 ( 0.00%) pub fn is_in_test(tcx: TyCtxt<'_>, hir_id: HirId) -> bool { 4,525 ( 0.00%) is_in_test_function(tcx, hir_id) || is_in_cfg_test(tcx, hir_id) 1,310,933 ( 0.04%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_test_function (905x) 7,240 ( 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> { 1,779 ( 0.00%) pub fn use_node(&self, cx: &LateContext<'tcx>) -> ExprUseNode<'tcx> { 13,823 ( 0.00%) match self.node { 246 ( 0.00%) Node::LetStmt(l) => ExprUseNode::LetStmt(l), 27 ( 0.00%) Node::ExprField(field) => ExprUseNode::Field(field), . . Node::Item(&Item { . kind: ItemKind::Static(..) | ItemKind::Const(..), . owner_id, . .. . }) . | Node::TraitItem(&TraitItem { . kind: TraitItemKind::Const(..), -- line 2504 ---------------------------------------- -- line 2513 ---------------------------------------- . . Node::Item(&Item { . kind: ItemKind::Fn { .. }, . owner_id, . .. . }) . | Node::TraitItem(&TraitItem { . kind: TraitItemKind::Fn(..), 2 ( 0.00%) owner_id, . .. . }) . | Node::ImplItem(&ImplItem { . kind: ImplItemKind::Fn(..), 135 ( 0.00%) owner_id, . .. . }) => ExprUseNode::Return(owner_id), . 12,408 ( 0.00%) Node::Expr(use_expr) => match use_expr.kind { 4 ( 0.00%) ExprKind::Ret(_) => ExprUseNode::Return(OwnerId { 10 ( 0.00%) def_id: cx.tcx.hir_body_owner_def_id(cx.enclosing_body.unwrap()), 244 ( 0.00%) => ???:::hir_body_owner_def_id (2x) . }), . 18 ( 0.00%) ExprKind::Closure(closure) => ExprUseNode::Return(OwnerId { def_id: closure.def_id }), 515 ( 0.00%) ExprKind::Call(func, args) => match args.iter().position(|arg| arg.hir_id == self.child_id) { 1,545 ( 0.00%) Some(i) => ExprUseNode::FnArg(func, i), . None => ExprUseNode::Callee, . }, 3,440 ( 0.00%) ExprKind::MethodCall(name, _, args, _) => ExprUseNode::MethodArg( 688 ( 0.00%) use_expr.hir_id, 688 ( 0.00%) name.args, . args.iter() . .position(|arg| arg.hir_id == self.child_id) . .map_or(0, |i| i + 1), . ), . ExprKind::Field(_, name) => ExprUseNode::FieldAccess(name), 16 ( 0.00%) ExprKind::AddrOf(kind, mutbl, _) => ExprUseNode::AddrOf(kind, mutbl), . _ => ExprUseNode::Other, . }, . _ => ExprUseNode::Other, . } 5,337 ( 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 { 3,450 ( 0.00%) matches!(self, Self::Return(_)) . } . . /// Checks if the value is used as a method call receiver. . pub fn is_recv(&self) -> bool { 610 ( 0.00%) matches!(self, Self::MethodArg(_, _, 0)) . } . . /// Gets the needed type as it's defined without any type inference. 12,243 ( 0.00%) pub fn defined_ty(&self, cx: &LateContext<'tcx>) -> Option> { 17,818 ( 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()), . }), 290 ( 0.00%) Self::Return(id) => { 447 ( 0.00%) if let Node::Expr(Expr { . kind: ExprKind::Closure(c), . .. 151 ( 0.00%) }) = cx.tcx.hir_node_by_def_id(id.def_id) . { 30 ( 0.00%) match c.fn_decl.output { . FnRetTy::DefaultReturn(_) => None, . FnRetTy::Return(ty) => Some(DefinedTy::Hir(ty)), . } . } else { . let ty = cx.tcx.fn_sig(id).instantiate_identity().skip_norm_wip().output(); 556 ( 0.00%) Some(DefinedTy::Mir { . def_site_def_id: Some(id.def_id.to_def_id()), . ty, . }) . } . }, 63 ( 0.00%) Self::Field(field) => match get_parent_expr_for_hir(cx, field.hir_id) { . Some(Expr { . hir_id, . kind: ExprKind::Struct(path, ..), . .. 90 ( 0.00%) }) => adt_and_variant_of_res(cx, cx.qpath_res(path, *hir_id)) 7,001 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::adt_and_variant_of_res (9x) 207 ( 0.00%) => ???:::qpath_res (9x) . .and_then(|(adt, variant)| { . variant . .fields . .iter() . .find(|f| f.name == field.ident.name) . .map(|f| (adt, f)) . }) . .map(|(adt, field_def)| DefinedTy::Mir { . def_site_def_id: Some(adt.did()), 54 ( 0.00%) ty: Binder::dummy(cx.tcx.type_of(field_def.did).instantiate_identity().skip_norm_wip()), 72 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_type_ir/src/binder.rs:>::dummy (9x) . }), . _ => None, . }, 1,030 ( 0.00%) Self::FnArg(callee, i) => { 1,545 ( 0.00%) let sig = expr_sig(cx, callee)?; 116,516 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::expr_sig (515x) 4,120 ( 0.00%) let (hir_ty, ty) = sig.input_with_hir(i)?; 22,159 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:::input_with_hir (515x) 3,096 ( 0.00%) Some(match hir_ty { . Some(hir_ty) => DefinedTy::Hir(hir_ty), . None => DefinedTy::Mir { . def_site_def_id: sig.predicates_id(), . ty, . }, . }) 515 ( 0.00%) }, 1,324 ( 0.00%) Self::MethodArg(id, _, i) => { 1,324 ( 0.00%) let id = cx.typeck_results().type_dependent_def_id(id)?; 33,834 ( 0.00%) => ???:::type_dependent_def_id (662x) 662 ( 0.00%) let sig = cx.tcx.fn_sig(id).skip_binder(); 2,648 ( 0.00%) Some(DefinedTy::Mir { . def_site_def_id: Some(id), . ty: sig.input(i), . }) 662 ( 0.00%) }, . Self::LetStmt(_) | Self::FieldAccess(..) | Self::Callee | Self::Other | Self::AddrOf(..) => None, . } 15,741 ( 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 { 4,234 ( 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> { 5,445 ( 0.00%) let mut adjustments: &[_] = typeck.expr_adjustments(e); 76,977 ( 0.00%) => ???:::expr_adjustments (1,815x) . let mut is_ty_unified = false; . let mut moved_before_use = false; . let mut same_ctxt = true; 25,410 ( 0.00%) ReplacingFilterMap( 3,630 ( 0.00%) hir_parent_with_src_iter(tcx, e.hir_id), . move |iter: &mut _, (parent, child_id)| { . let parent_ctxt; . let mut parent_adjustments: &[_] = &[]; 8,468 ( 0.00%) match parent { . Node::Expr(parent_expr) => { 1,736 ( 0.00%) parent_ctxt = parent_expr.span.ctxt(); 5,208 ( 0.00%) same_ctxt &= parent_ctxt == ctxt; 5,208 ( 0.00%) parent_adjustments = typeck.expr_adjustments(parent_expr); 68,084 ( 0.00%) => ???:::expr_adjustments (1,736x) 9,824 ( 0.00%) match parent_expr.kind { 76 ( 0.00%) ExprKind::Match(scrutinee, arms, _) if scrutinee.hir_id != child_id => { 4 ( 0.00%) is_ty_unified |= arms.len() != 1; . moved_before_use = true; . if adjustments.is_empty() { . adjustments = parent_adjustments; . } . return None; . }, . ExprKind::If(cond, _, else_) if cond.hir_id != child_id => { . is_ty_unified |= else_.is_some(); -- line 2708 ---------------------------------------- -- 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; . }, 147 ( 0.00%) ExprKind::Block(b, _) => { 147 ( 0.00%) is_ty_unified |= b.targeted_by_break; . moved_before_use = true; . if adjustments.is_empty() { . adjustments = parent_adjustments; . } . return None; . }, . ExprKind::DropTemps(_) | ExprKind::Type(..) => { . if adjustments.is_empty() { -- line 2733 ---------------------------------------- -- line 2734 ---------------------------------------- . adjustments = parent_adjustments; . } . return None; . }, . _ => {}, . } . }, . Node::Arm(arm) => { 4 ( 0.00%) parent_ctxt = arm.span.ctxt(); 12 ( 0.00%) same_ctxt &= parent_ctxt == ctxt; 8 ( 0.00%) if arm.body.hir_id == child_id { . return None; . } . }, . Node::Block(b) => { 588 ( 0.00%) same_ctxt &= b.span.ctxt() == ctxt; . return None; . }, . Node::ConstBlock(_) => parent_ctxt = ctxt, 9 ( 0.00%) Node::ExprField(&ExprField { span, .. }) => { . parent_ctxt = span.ctxt(); 18 ( 0.00%) same_ctxt &= parent_ctxt == ctxt; 9 ( 0.00%) }, . Node::AnonConst(&AnonConst { span, .. }) . | Node::ConstArg(&ConstArg { span, .. }) . | Node::Field(&FieldDef { span, .. }) . | Node::ImplItem(&ImplItem { span, .. }) . | Node::Item(&Item { span, .. }) . | Node::LetStmt(&LetStmt { span, .. }) . | Node::Stmt(&Stmt { span, .. }) . | Node::TraitItem(&TraitItem { span, .. }) . | Node::Variant(&Variant { span, .. }) => { . parent_ctxt = span.ctxt(); 442 ( 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), . }) . }, . ) . } . 21,780 ( 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, . } . }) 14,520 ( 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| { 4,907 ( 0.00%) let end = pos + t.len; 3 ( 0.00%) let range = pos as usize..end as usize; . let inner = InnerSpan::new(range.start, range.end); 1,610 ( 0.00%) pos = end; 2,086 ( 0.00%) (t.kind, s.get(range).unwrap_or_default(), inner) 22 ( 0.00%) }) . } . . /// Checks whether a given span has any comment token . /// This checks for all types of comment: line "//", block "/**", doc "///" "//!" . pub fn span_contains_comment<'sm>(sm: impl HasSourceMap<'sm>, span: Span) -> bool { . span.check_text(sm, |snippet| { . tokenize(snippet, FrontmatterAllowed::No).any(|token| { 47,557 ( 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 2874 ---------------------------------------- . pub fn span_extract_comment<'sm>(sm: impl HasSourceMap<'sm>, span: Span) -> String { . span_extract_comments(sm, span).join("\n") . } . . /// Returns all the comments a given span contains. . /// . /// Comments are returned wrapped with their relevant delimiters. . pub fn span_extract_comments<'sm>(sm: impl HasSourceMap<'sm>, span: Span) -> Vec { 16 ( 0.00%) span.with_source_text(sm, |snippet| { 13,264 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:::with_source_text::, &rustc_lint::context::LateContext, clippy_utils::span_extract_comments<&rustc_lint::context::LateContext>::{closure#0}> (8x) . tokenize_with_text(snippet) 64 ( 0.00%) .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 { 182 ( 0.00%) sm.span_take_while(span, |&ch| ch == ' ' || ch == ';') 132,692 ( 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:: (182x) . } . . /// 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)> { 11,604 ( 0.00%) match kind { . $(hir::BinOpKind::$name => Some((LangItem::$name, LangItem::$assign)),)* . _ => None, . } . } . }; . } . . op_utils! { -- line 2958 ---------------------------------------- -- line 2966 ---------------------------------------- . BitOr BitOrAssign . Shl ShlAssign . Shr ShrAssign . } . . /// Returns `true` if the pattern is a `PatWild`, or is an ident prefixed with `_` . /// that is not locally used. . pub fn pat_is_wild<'tcx>(cx: &LateContext<'tcx>, pat: &'tcx PatKind<'_>, body: impl Visitable<'tcx>) -> bool { 236 ( 0.00%) match *pat { . PatKind::Wild => true, 66 ( 0.00%) PatKind::Binding(_, id, ident, None) if ident.as_str().starts_with('_') => { 704 ( 0.00%) => ???:::as_str (22x) . !visitors::is_local_used(cx, body, id) . }, . _ => false, . } . } . . #[derive(Clone, Copy)] . pub enum RequiresSemi { -- line 2984 ---------------------------------------- -- line 2989 ---------------------------------------- . pub fn requires_semi(self) -> bool { . matches!(self, Self::Yes) . } . } . . /// Check if the expression return `!`, a type coerced from `!`, or could return `!` if the final . /// expression were turned into a statement. . #[expect(clippy::too_many_lines)] 565 ( 0.00%) pub fn is_never_expr<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) -> Option { . struct BreakTarget { . id: HirId, . unused: bool, . } . . struct V<'cx, 'tcx> { . cx: &'cx LateContext<'tcx>, . break_targets: Vec, -- line 3005 ---------------------------------------- -- line 3012 ---------------------------------------- . impl V<'_, '_> { . fn push_break_target(&mut self, id: HirId) { . self.break_targets.push(BreakTarget { id, unused: true }); . self.break_targets_for_result_ty += u32::from(self.in_final_expr); . } . } . . impl<'tcx> Visitor<'tcx> for V<'_, 'tcx> { 5,720 ( 0.00%) fn visit_expr(&mut self, e: &'tcx Expr<'_>) { . // Note: Part of the complexity here comes from the fact that . // coercions are applied to the innermost expression. . // e.g. In `let x: u32 = { break () };` the never-to-any coercion . // is applied to the break expression. This means we can't just . // check the block's type as it will be `u32` despite the fact . // that the block always diverges. . . // The rest of the complexity comes from checking blocks which -- line 3028 ---------------------------------------- -- line 3029 ---------------------------------------- . // syntactically return a value, but will always diverge before . // reaching that point. . // e.g. In `let x = { foo(panic!()) };` the block's type will be the . // return type of `foo` even though it will never actually run. This . // can be trivially fixed by adding a semicolon after the call, but . // we must first detect that a semicolon is needed to make that . // suggestion. . 1,088 ( 0.00%) if self.is_never && self.break_targets.is_empty() { . if self.in_final_expr && !self.requires_semi { . // This expression won't ever run, but we still need to check . // if it can affect the type of the final expression. . match e.kind { . ExprKind::DropTemps(e) => self.visit_expr(e), . ExprKind::If(_, then, Some(else_)) => { . self.visit_expr(then); . self.visit_expr(else_); -- line 3045 ---------------------------------------- -- line 3066 ---------------------------------------- . }, . _ => { . self.requires_semi = !self.cx.typeck_results().expr_ty(e).is_never(); . }, . } . } . return; . } 3,472 ( 0.00%) match e.kind { . ExprKind::DropTemps(e) => self.visit_expr(e), . ExprKind::Ret(None) | ExprKind::Continue(_) => self.is_never = true, . ExprKind::Ret(Some(e)) | ExprKind::Become(e) => { 23 ( 0.00%) self.in_final_expr = false; 46 ( 0.00%) self.visit_expr(e); 3,692 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:::visit_expr'2 (5x) . self.is_never = true; . }, . ExprKind::Break(dest, e) => { . if let Some(e) = e { . self.in_final_expr = false; . self.visit_expr(e); . } . if let Ok(id) = dest.target_id -- line 3087 ---------------------------------------- -- line 3093 ---------------------------------------- . { . target.unused &= self.is_never; . if i < self.break_targets_for_result_ty as usize { . self.requires_semi = true; . } . } . self.is_never = true; . }, 60 ( 0.00%) ExprKind::If(cond, then, else_) => { . let in_final_expr = mem::replace(&mut self.in_final_expr, false); 60 ( 0.00%) self.visit_expr(cond); 260 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:::visit_expr'2 (1x) 20 ( 0.00%) self.in_final_expr = in_final_expr; . 60 ( 0.00%) if self.is_never { . self.visit_expr(then); . if let Some(else_) = else_ { . self.visit_expr(else_); . } . } else { . self.visit_expr(then); . let is_never = mem::replace(&mut self.is_never, false); 40 ( 0.00%) if let Some(else_) = else_ { 21 ( 0.00%) self.visit_expr(else_); 172 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:::visit_expr'2 (1x) 7 ( 0.00%) self.is_never &= is_never; . } . } . }, 21 ( 0.00%) ExprKind::Match(scrutinee, arms, _) => { . let in_final_expr = mem::replace(&mut self.in_final_expr, false); 21 ( 0.00%) self.visit_expr(scrutinee); 2,630 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:::visit_expr'2 (4x) 7 ( 0.00%) self.in_final_expr = in_final_expr; . 21 ( 0.00%) if self.is_never { . for arm in arms { . self.visit_arm(arm); . } . } else { . let mut is_never = true; . for arm in arms { 28 ( 0.00%) self.is_never = false; 56 ( 0.00%) if let Some(guard) = arm.guard { . let in_final_expr = mem::replace(&mut self.in_final_expr, false); . self.visit_expr(guard); . self.in_final_expr = in_final_expr; . // The compiler doesn't consider diverging guards as causing the arm to diverge. . self.is_never = false; . } 42 ( 0.00%) self.visit_expr(arm.body); 2,368 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:::visit_expr'2 (8x) 14 ( 0.00%) is_never &= self.is_never; . } 7 ( 0.00%) self.is_never = is_never; . } . }, . ExprKind::Loop(b, _, _, _) => { . self.push_break_target(e.hir_id); . self.in_final_expr = false; . self.visit_block(b); . self.is_never = self.break_targets.pop().unwrap().unused; . }, 43 ( 0.00%) ExprKind::Block(b, _) => { 129 ( 0.00%) if b.targeted_by_break { . self.push_break_target(b.hir_id); . self.visit_block(b); . self.is_never &= self.break_targets.pop().unwrap().unused; . } else { . self.visit_block(b); . } . }, 451 ( 0.00%) _ => { 451 ( 0.00%) self.in_final_expr = false; 1,353 ( 0.00%) walk_expr(self, e); 5,067 ( 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:: (42x) 1,804 ( 0.00%) self.is_never |= self.cx.typeck_results().expr_ty(e).is_never(); 1,680 ( 0.00%) => ???:::expr_ty (42x) . }, . } 4,167 ( 0.00%) } . . fn visit_block(&mut self, b: &'tcx Block<'_>) { . let in_final_expr = mem::replace(&mut self.in_final_expr, false); 43 ( 0.00%) for s in b.stmts { . self.visit_stmt(s); . } 86 ( 0.00%) self.in_final_expr = in_final_expr; 191 ( 0.00%) if let Some(e) = b.expr { . self.visit_expr(e); . } . } . . fn visit_local(&mut self, l: &'tcx LetStmt<'_>) { 30 ( 0.00%) if let Some(e) = l.init { 20 ( 0.00%) self.visit_expr(e); 3,152 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:::visit_expr'2 (2x) . } 30 ( 0.00%) if let Some(else_) = l.els { . let is_never = self.is_never; . self.visit_block(else_); . self.is_never = is_never; . } . } . . fn visit_arm(&mut self, arm: &Arm<'tcx>) { . if let Some(guard) = arm.guard { -- line 3192 ---------------------------------------- -- line 3193 ---------------------------------------- . let in_final_expr = mem::replace(&mut self.in_final_expr, false); . self.visit_expr(guard); . self.in_final_expr = in_final_expr; . } . self.visit_expr(arm.body); . } . } . 452 ( 0.00%) if cx.typeck_results().expr_ty(e).is_never() { 4,532 ( 0.00%) => ???:::expr_ty (113x) . Some(RequiresSemi::No) 278 ( 0.00%) } else if let ExprKind::Block(b, _) = e.kind 36 ( 0.00%) && !b.targeted_by_break 18 ( 0.00%) && b.expr.is_none() . { . // If a block diverges without a final expression then it's type is `!`. . None . } else { 416 ( 0.00%) let mut v = V { . cx, . break_targets: Vec::new(), . break_targets_for_result_ty: 0, . in_final_expr: true, . requires_semi: false, . is_never: false, . }; 104 ( 0.00%) v.visit_expr(e); 64,431 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:::visit_expr (52x) . v.is_never 156 ( 0.00%) .then_some(if v.requires_semi && matches!(e.kind, ExprKind::Block(..)) { . RequiresSemi::Yes . } else { . RequiresSemi::No . }) . } 565 ( 0.00%) } . . /// Produces a path from a local caller to the type of the called method. Suitable for user . /// output/suggestions. . /// . /// Returned path can be either absolute (for methods defined non-locally), or relative (for local . /// methods). . pub fn get_path_from_caller_to_method_type<'tcx>( . tcx: TyCtxt<'tcx>, -- line 3234 ---------------------------------------- -- line 3363 ---------------------------------------- . cx.tcx.parent_hir_node(id), . Node::Stmt(..) | Node::Block(Block { stmts: [], .. }) . ) . } . . /// Returns true if the given `expr` is a block or resembled as a block, . /// such as `if`, `loop`, `match` expressions etc. . pub fn is_block_like(expr: &Expr<'_>) -> bool { 9 ( 0.00%) matches!( 18 ( 0.00%) expr.kind, . ExprKind::Block(..) | ExprKind::ConstBlock(..) | ExprKind::If(..) | ExprKind::Loop(..) | ExprKind::Match(..) . ) . } . . /// Returns true if the given `expr` is binary expression that needs to be wrapped in parentheses. . pub fn binary_expr_needs_parentheses(expr: &Expr<'_>) -> bool { . fn contains_block(expr: &Expr<'_>, is_operand: bool) -> bool { 30 ( 0.00%) match expr.kind { . ExprKind::Binary(_, lhs, _) | ExprKind::Cast(lhs, _) => contains_block(lhs, true), . _ if is_block_like(expr) => is_operand, . _ => false, . } . } . . contains_block(expr, false) 6 ( 0.00%) } . . /// Returns true if the specified expression is in a receiver position. . pub fn is_receiver_of_method_call(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . if let Some(parent_expr) = get_parent_expr(cx, expr) . && let ExprKind::MethodCall(_, receiver, ..) = parent_expr.kind . && receiver.hir_id == expr.hir_id . { . return true; . } . false . } . . /// Returns true if `expr` creates any temporary whose type references a non-static lifetime and has . /// a significant drop and does not consume it. 12 ( 0.00%) pub fn leaks_droppable_temporary_with_limited_lifetime<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> bool { 24 ( 0.00%) for_each_unconsumed_temporary(cx, expr, |temporary_ty| { 40 ( 0.00%) if temporary_ty.has_significant_drop(cx.tcx, cx.typing_env()) 154,353 ( 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:::has_significant_drop (4x) 120 ( 0.00%) => ???:::typing_env (4x) . && temporary_ty . .walk() . .any(|arg| matches!(arg.kind(), GenericArgKind::Lifetime(re) if !re.is_static())) . { . ControlFlow::Break(()) . } else { . ControlFlow::Continue(()) . } 20 ( 0.00%) }) . .is_break() 12 ( 0.00%) } . . /// Returns true if `expr` creates any temporary that has a significant drop and does not consume . /// it. . pub fn leaks_droppable_temporary<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> bool { . for_each_unconsumed_temporary(cx, expr, |temporary_ty| { . if temporary_ty.has_significant_drop(cx.tcx, cx.typing_env()) { . ControlFlow::Break(()) . } else { -- line 3424 ---------------------------------------- -- line 3433 ---------------------------------------- . /// . /// Similar to [`is_adjusted`], this not only checks if an expression's type was adjusted, . /// but also going through extra steps to see if it fits the description of [coercion sites]. . /// . /// You should used this when you want to avoid suggesting replacing an expression that is currently . /// a coercion site or coercion propagating expression with one that is not. . /// . /// [coercion sites]: https://doc.rust-lang.org/stable/reference/type-coercions.html#coercion-sites 27 ( 0.00%) pub fn expr_requires_coercion<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) -> bool { . let expr_ty_is_adjusted = cx . .typeck_results() 18 ( 0.00%) .expr_adjustments(expr) 121 ( 0.00%) => ???:::expr_adjustments (3x) . .iter() . // ignore `NeverToAny` adjustments, such as `panic!` call. . .any(|adj| !matches!(adj.kind, Adjust::NeverToAny)); . if expr_ty_is_adjusted { . return true; . } . . // Identify coercion sites and recursively check if those sites . // actually have type adjustments. 56 ( 0.00%) match expr.kind { 6 ( 0.00%) ExprKind::Call(_, args) | ExprKind::MethodCall(_, _, args, _) if let Some(def_id) = fn_def_id(cx, expr) => { 2 ( 0.00%) let fn_sig = cx.tcx.fn_sig(def_id).instantiate_identity().skip_norm_wip(); . 2 ( 0.00%) if !fn_sig.output().skip_binder().has_type_flags(TypeFlags::HAS_TY_PARAM) { . return false; . } . 3 ( 0.00%) let self_arg_count = usize::from(matches!(expr.kind, ExprKind::MethodCall(..))); . let mut args_with_ty_param = { . fn_sig . .inputs() . .skip_binder() . .iter() . .skip(self_arg_count) . .zip(args) . .filter_map(|(arg_ty, arg)| { . if arg_ty.has_type_flags(TypeFlags::HAS_TY_PARAM) { . Some(arg) . } else { . None . } . }) . }; 3 ( 0.00%) args_with_ty_param.any(|arg| expr_requires_coercion(cx, arg)) 287 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::expr_requires_coercion'2 (1x) . }, . // Struct/union initialization. . ExprKind::Struct(qpath, _, _) => { . let res = cx.typeck_results().qpath_res(qpath, expr.hir_id); . if let Some((_, v_def)) = adt_and_variant_of_res(cx, res) { . let rustc_ty::Adt(_, generic_args) = cx.typeck_results().expr_ty_adjusted(expr).kind() else { . // This should never happen, but when it does, not linting is the better option. . return true; -- line 3486 ---------------------------------------- -- line 3502 ---------------------------------------- . ) . | ExprKind::Ret(Some(ret_expr)) => expr_requires_coercion(cx, ret_expr), . . // ===== Coercion-propagation expressions ===== . ExprKind::Array(elems) | ExprKind::Tup(elems) => elems.iter().any(|elem| expr_requires_coercion(cx, elem)), . // Array but with repeating syntax. . ExprKind::Repeat(rep_elem, _) => expr_requires_coercion(cx, rep_elem), . // Others that may contain coercion sites. 2 ( 0.00%) ExprKind::If(_, then, maybe_else) => { 4 ( 0.00%) expr_requires_coercion(cx, then) || maybe_else.is_some_and(|e| expr_requires_coercion(cx, e)) 691 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::expr_requires_coercion'2 (1x) . }, . ExprKind::Match(_, arms, _) => arms . .iter() . .map(|arm| arm.body) . .any(|body| expr_requires_coercion(cx, body)), . _ => false, . } 27 ( 0.00%) } . . /// Returns `true` if `expr` designates a mutable static, a mutable local binding, or an expression . /// that can be owned. . pub fn is_mutable(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . if let Some(hir_id) = expr.res_local_id() . && let Node::Pat(pat) = cx.tcx.hir_node(hir_id) . { . matches!(pat.kind, PatKind::Binding(BindingMode::MUT, ..)) -- line 3527 ---------------------------------------- -- line 3570 ---------------------------------------- . { . Some(into_future_arg) . } else { . None . } . } . . /// Checks if the given expression is a call to `Default::default()`. 1,027 ( 0.00%) pub fn is_expr_default<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> bool { 2,296 ( 0.00%) if let ExprKind::Call(fn_expr, []) = &expr.kind 179 ( 0.00%) && let ExprKind::Path(qpath) = &fn_expr.kind 396 ( 0.00%) && let Res::Def(_, def_id) = cx.qpath_res(qpath, fn_expr.hir_id) 3,248 ( 0.00%) => ???:::qpath_res (44x) . { 132 ( 0.00%) cx.tcx.is_diagnostic_item(sym::default_fn, def_id) 2,918 ( 0.00%) => ???:::is_diagnostic_item (44x) . } else { . false . } 1,027 ( 0.00%) } . . /// Checks if `expr` may be directly used as the return value of its enclosing body. . /// The following cases are covered: . /// - `expr` as the last expression of the body, or of a block that can be used as the return value . /// - `return expr` . /// - then or else part of a `if` in return position . /// - arm body of a `match` in a return position . /// - `break expr` or `break 'label expr` if the loop or block being exited is used as a return -- line 3595 ---------------------------------------- -- line 3597 ---------------------------------------- . /// . /// Contrary to [`TyCtxt::hir_get_fn_id_for_return_block()`], if `expr` is part of a . /// larger expression, for example a field expression of a `struct`, it will not be . /// considered as matching the condition and will return `false`. . /// . /// Also, even if `expr` is assigned to a variable which is later returned, this function . /// will still return `false` because `expr` is not used *directly* as the return value . /// as it goes through the intermediate variable. 84 ( 0.00%) pub fn potential_return_of_enclosing_body(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 12 ( 0.00%) let enclosing_body_owner = cx . .tcx 84 ( 0.00%) .local_def_id_to_hir_id(cx.tcx.hir_enclosing_body_owner(expr.hir_id)); 4,562 ( 0.00%) => ???:::hir_enclosing_body_owner (12x) . let mut prev_id = expr.hir_id; . let mut skip_until_id = None; 60 ( 0.00%) for (hir_id, node) in cx.tcx.hir_parent_iter(expr.hir_id) { 35 ( 0.00%) if hir_id == enclosing_body_owner { . return true; . } 52 ( 0.00%) if let Some(id) = skip_until_id { . prev_id = hir_id; . if id == hir_id { . skip_until_id = None; . } . continue; . } 100 ( 0.00%) match node { 12 ( 0.00%) Node::Block(Block { expr, .. }) if expr.is_some_and(|expr| expr.hir_id == prev_id) => {}, . Node::Arm(arm) if arm.body.hir_id == prev_id => {}, 95 ( 0.00%) Node::Expr(expr) => match expr.kind { . ExprKind::Ret(_) => return true, . ExprKind::If(_, then, opt_else) 8 ( 0.00%) if then.hir_id == prev_id || opt_else.is_some_and(|els| els.hir_id == prev_id) => {}, . ExprKind::Match(_, arms, _) if arms.iter().any(|arm| arm.hir_id == prev_id) => {}, 10 ( 0.00%) ExprKind::Block(block, _) if block.hir_id == prev_id => {}, . ExprKind::Break( . Destination { . target_id: Ok(target_id), . .. . }, . _, . ) => skip_until_id = Some(target_id), . _ => break, -- line 3638 ---------------------------------------- -- line 3640 ---------------------------------------- . _ => break, . } . prev_id = hir_id; . } . . // `expr` is used as part of "something" and is not returned directly from its . // enclosing body. . false 108 ( 0.00%) } . . /// Checks if the expression has adjustments that require coercion, for example: dereferencing with . /// overloaded deref, coercing pointers and `dyn` objects. . pub fn expr_adjustment_requires_coercion(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . cx.typeck_results().expr_adjustments(expr).iter().any(|adj| { . matches!( . adj.kind, . Adjust::Deref(DerefAdjustKind::Overloaded(_)) -- line 3656 ---------------------------------------- -- line 3671 ---------------------------------------- . )), . .. . }) . ) . } . . /// Checks if the chosen edition and `msrv` allows using `if let` chains. . pub fn can_use_if_let_chains(cx: &LateContext<'_>, msrv: Msrv) -> bool { 225 ( 0.00%) cx.tcx.sess.edition().at_least_rust_2024() && msrv.meets(cx, msrvs::LET_CHAINS) 75 ( 0.00%) } . . /// Returns an iterator over successive parent nodes paired with the ID of the node which . /// immediatly preceeded them. . #[inline] . pub fn hir_parent_with_src_iter(tcx: TyCtxt<'_>, mut id: HirId) -> impl Iterator, HirId)> { . tcx.hir_parent_id_iter(id) 38,639 ( 0.00%) .map(move |parent| (tcx.hir_node(parent), mem::replace(&mut id, parent))) 2,604 ( 0.00%) => ???:::hir_node (42x) . } 419,393 ( 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/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 { 511,327 ( 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 { 343,772 ( 0.01%) Vec { buf: RawVec::with_capacity_in(capacity, alloc), len: 0 } . } . . /// Appends an element to the back of a collection. . /// . /// # Panics . /// . /// Panics if the new capacity exceeds `isize::MAX` _bytes_. . /// -- line 977 ---------------------------------------- -- line 988 ---------------------------------------- . /// Takes amortized *O*(1) time. If the vector's length would exceed its . /// capacity after the push, *O*(*capacity*) time is taken to copy the . /// vector's elements to a larger allocation. This expensive operation is . /// offset by the *capacity* *O*(1) insertions it allows. . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_confusables("push_back", "put", "append")] . pub fn push(&mut self, value: T) { 573 ( 0.00%) let _ = self.push_mut(value); 13,633 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:>::push_mut (190x) . } . . /// Appends an element to the back of a collection, returning a reference to it. . /// . /// # Panics . /// . /// Panics if the new capacity exceeds `isize::MAX` _bytes_. . /// -- line 1004 ---------------------------------------- -- line 1019 ---------------------------------------- . /// . /// Takes amortized *O*(1) time. If the vector's length would exceed its . /// capacity after the push, *O*(*capacity*) time is taken to copy the . /// vector's elements to a larger allocation. This expensive operation is . /// offset by the *capacity* *O*(1) insertions it allows. . #[inline] . #[stable(feature = "push_mut", since = "1.95.0")] . #[must_use = "if you don't need a reference to the value, use `Vec::push` instead"] 955 ( 0.00%) pub fn push_mut(&mut self, value: T) -> &mut T { . // Inform codegen that the length does not change across grow_one(). 111,823 ( 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. 251,909 ( 0.01%) if len == self.buf.capacity() { 29,337 ( 0.00%) self.buf.grow_one(); 3,102 ( 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 (29x) . } . unsafe { . let end = self.as_mut_ptr().add(len); . ptr::write(end, value); 239,577 ( 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 . } 767 ( 0.00%) } . } . . impl Vec { . /// Constructs a new, empty `Vec`. . /// . /// The vector will not allocate until elements are pushed onto it. . /// . /// # Examples -- line 1050 ---------------------------------------- -- line 1188 ---------------------------------------- . capacity: usize, . alloc: A, . ) -> Self { . ub_checks::assert_unsafe_precondition!( . check_library_ub, . "Vec::from_raw_parts_in requires that length <= capacity", . (length: usize = length, capacity: usize = capacity) => length <= capacity . ); 5,542 ( 0.00%) unsafe { Vec { buf: RawVec::from_raw_parts_in(ptr, capacity, alloc), len: length } } . } . . #[doc(alias = "from_non_null_parts_in")] . /// Creates a `Vec` directly from a `NonNull` pointer, a length, a capacity, . /// and an allocator. . /// . /// # Safety . /// -- line 1204 ---------------------------------------- -- line 1303 ---------------------------------------- . capacity: usize, . alloc: A, . ) -> Self { . ub_checks::assert_unsafe_precondition!( . check_library_ub, . "Vec::from_parts_in requires that length <= capacity", . (length: usize = length, capacity: usize = capacity) => length <= capacity . ); 276 ( 0.00%) unsafe { Vec { buf: RawVec::from_nonnull_in(ptr, capacity, alloc), len: length } } . } . . /// Decomposes a `Vec` into its raw components: `(pointer, length, capacity, allocator)`. . /// . /// Returns the raw pointer to the underlying data, the length of the vector (in elements), . /// the allocated capacity of the data (in elements), and the allocator. These are the same . /// arguments in the same order as the arguments to [`from_raw_parts_in`]. . /// -- line 1319 ---------------------------------------- -- line 1453 ---------------------------------------- . /// let mut vec = vec![1]; . /// vec.reserve(10); . /// assert!(vec.capacity() >= 11); . /// ``` . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_diagnostic_item = "vec_reserve"] . pub fn reserve(&mut self, additional: usize) { 9,412 ( 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. 13,066 ( 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. 34,079 ( 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); 13,577 ( 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 967,106 ( 0.03%) &*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 141,900 ( 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 . ); . 38,190 ( 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(); 2,538 ( 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(); 1,269 ( 0.00%) ptr::copy(base_ptr.add(len - 1), base_ptr.add(index), 1); . self.set_len(len - 1); . value . } . } . . /// Inserts an element at position `index` within the vector, shifting all . /// elements after it to the right. . /// -- line 2279 ---------------------------------------- -- line 2340 ---------------------------------------- . } . . let len = self.len(); . if index > len { . assert_failed(index, len); . } . . // space for the new element 16 ( 0.00%) if len == self.buf.capacity() { 12 ( 0.00%) self.buf.grow_one(); 1,518 ( 0.00%) => ???:>::grow_one (6x) . } . . unsafe { . // infallible . // The spot to put the new value . let p = self.as_mut_ptr().add(index); . { 16 ( 0.00%) if index < len { . // Shift everything over to make space. (Duplicating the . // `index`th element into two consecutive places.) . ptr::copy(p, p.add(1), len - index); . } . // Write it in, overwriting the first copy of the `index`th . // element. . ptr::write(p, element); . } 14 ( 0.00%) self.set_len(len + 1); . &mut *p . } . } . . /// Removes and returns the element at position `index` within the vector, . /// shifting all elements after it to the left. . /// . /// Note: Because this shifts over the remaining elements, it has a -- line 2374 ---------------------------------------- -- line 2473 ---------------------------------------- . /// ``` . /// let mut vec = vec![1, 2, 3, 4, 5]; . /// let keep = [false, true, true, false, true]; . /// let mut iter = keep.iter(); . /// vec.retain(|_| *iter.next().unwrap()); . /// assert_eq!(vec, [2, 3, 5]); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] 486 ( 0.00%) pub fn retain(&mut self, mut f: F) . where . F: FnMut(&T) -> bool, . { 1,955 ( 0.00%) self.retain_mut(|elem| f(elem)); 450 ( 0.00%) } . . /// Retains only the elements specified by the predicate, passing a mutable reference to it. . /// . /// In other words, remove all elements `e` such that `f(&mut e)` returns `false`. . /// This method operates in place, visiting each element exactly once in the . /// original order, and preserves the order of the retained elements. . /// . /// # Examples -- line 2494 ---------------------------------------- -- line 2505 ---------------------------------------- . /// ``` . #[stable(feature = "vec_retain_mut", since = "1.61.0")] . pub fn retain_mut(&mut self, mut f: F) . where . F: FnMut(&mut T) -> bool, . { . let original_len = self.len(); . 152 ( 0.00%) if original_len == 0 { . // Empty case: explicit return allows better optimization, vs letting compiler infer it . return; . } . . // Vec: [Kept, Kept, Hole, Hole, Hole, Hole, Unchecked, Unchecked] . // | ^- write ^- read | . // |<- original_len ->| . // Kept: Elements which predicate returns true on. -- line 2521 ---------------------------------------- -- line 2550 ---------------------------------------- . } . } . } . . let mut read = 0; . loop { . // SAFETY: read < original_len . let cur = unsafe { self.get_unchecked_mut(read) }; 394 ( 0.00%) if hint::unlikely(!f(cur)) { 38,954 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:>::retain::<>::multipart_suggestion_with_style<&str>::{closure#0}>::{closure#0} (115x) . break; . } 127 ( 0.00%) read += 1; 484 ( 0.00%) if read == original_len { . // All elements are kept, return early. . return; . } . } . . // Critical section starts here and at least one element is going to be removed. . // Advance `g.read` early to avoid double drop if `drop_in_place` panicked. . let mut g = PanicGuard { v: self, read: read + 1, write: read, original_len }; . // SAFETY: previous `read` is always less than original_len. . unsafe { ptr::drop_in_place(&mut *g.v.as_mut_ptr().add(read)) }; . 128 ( 0.00%) while g.read < g.original_len { . // SAFETY: `read` is always less than original_len. . let cur = unsafe { &mut *g.v.as_mut_ptr().add(g.read) }; 55 ( 0.00%) if !f(cur) { . // Advance `read` early to avoid double drop if `drop_in_place` panicked. . g.read += 1; . // SAFETY: We never touch this element again after dropped. . unsafe { ptr::drop_in_place(cur) }; . } else { . // SAFETY: `read` > `write`, so the slots don't overlap. . // We use copy for move, and never touch the source element again. . unsafe { . let hole = g.v.as_mut_ptr().add(g.write); . ptr::copy_nonoverlapping(cur, hole, 1); . } 55 ( 0.00%) g.write += 1; . g.read += 1; . } . } . . // We are leaving the critical section and no panic happened, . // Commit the length change and forget the guard. . // SAFETY: `write` is always less than or equal to original_len. . unsafe { g.v.set_len(g.write) }; . mem::forget(g); 5 ( 0.00%) } . . /// Removes all but the first of consecutive elements in the vector that resolve to the same . /// key. . /// . /// If the vector is sorted, this removes all duplicates. . /// . /// # Examples . /// -- line 2607 ---------------------------------------- -- line 2614 ---------------------------------------- . /// ``` . #[stable(feature = "dedup_by", since = "1.16.0")] . #[inline] . pub fn dedup_by_key(&mut self, mut key: F) . where . F: FnMut(&mut T) -> K, . K: PartialEq, . { 71 ( 0.00%) self.dedup_by(|a, b| key(a) == key(b)) 2,773 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs:>::dedup_by::<>::dedup_by_key<::check_uninlined_args::{closure#2}, rustc_span::span_encoding::Span>::{closure#0}> (71x) . } . . /// Removes all but the first of consecutive elements in the vector that are . /// "equal" according to the given predicate function. . /// . /// The predicate `same_bucket(x, p)` is passed references to two elements. . /// If it returns `true`, the element `x` is removed from the vector. . /// -- line 2630 ---------------------------------------- -- line 2662 ---------------------------------------- . /// } else { . /// false . /// } . /// }); . /// . /// assert_eq!(ranges, [1..5, 8..9]); . /// ``` . #[stable(feature = "dedup_by", since = "1.16.0")] 497 ( 0.00%) pub fn dedup_by(&mut self, mut same_bucket: F) . where . F: FnMut(&mut T, &mut T) -> bool, . { . let len = self.len(); 142 ( 0.00%) if len <= 1 { . return; . } . . // Check if we ever want to remove anything. . // This allows to use copy_non_overlapping in next cycle. . // And avoids any memory writes if we don't need to remove anything. . let mut first_duplicate_idx: usize = 1; . let start = self.as_mut_ptr(); 973 ( 0.00%) while first_duplicate_idx != len { . let found_duplicate = unsafe { . // SAFETY: first_duplicate always in range [1..len) . // Note that we start iteration from 1 so we never overflow. . let prev = start.add(first_duplicate_idx.wrapping_sub(1)); . let current = start.add(first_duplicate_idx); . // We explicitly say in docs that references are reversed. 103 ( 0.00%) same_bucket(&mut *current, &mut *prev) . }; 103 ( 0.00%) if found_duplicate { . break; . } . first_duplicate_idx += 1; . } . // Don't need to remove anything. . // We cannot get bigger than len. . if first_duplicate_idx == len { . return; -- line 2701 ---------------------------------------- -- line 2788 ---------------------------------------- . } . . /* Technically we could let `gap` clean up with its Drop, but . * when `same_bucket` is guaranteed to not panic, this bloats a little . * the codegen, so we just do it manually */ . gap.vec.set_len(gap.write); . mem::forget(gap); . } 568 ( 0.00%) } . . /// Appends an element and returns a reference to it if there is sufficient spare capacity, . /// otherwise an error is returned with the element. . /// . /// Unlike [`push`] this method will not reallocate when there's insufficient capacity. . /// The caller should use [`reserve`] or [`try_reserve`] to ensure that there is enough capacity. . /// . /// [`push`]: Vec::push -- line 2804 ---------------------------------------- -- line 2865 ---------------------------------------- . /// . /// # Time complexity . /// . /// Takes *O*(1) time. . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_diagnostic_item = "vec_pop"] . pub fn pop(&mut self) -> Option { 79,463 ( 0.00%) if self.len == 0 { . None . } else { . unsafe { 52,864 ( 0.00%) self.len -= 1; . core::hint::assert_unchecked(self.len < self.capacity()); 170 ( 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(); 13,203 ( 0.00%) if count > 0 { . unsafe { . ptr::copy_nonoverlapping(other as *const T, self.as_mut_ptr().add(len), count) . }; . } 19,793 ( 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 3035 ---------------------------------------- . // . let len = self.len(); . let Range { start, end } = slice::range(range, ..len); . . unsafe { . // set self.vec length's to start, to be safe in case Drain is leaked . self.set_len(start); . let range_slice = slice::from_raw_parts(self.as_ptr().add(start), end - start); 55 ( 0.00%) Drain { . tail_start: end, 11 ( 0.00%) tail_len: len - end, . iter: range_slice.iter(), . vec: NonNull::from(self), . } . } . } . . /// Clears the vector, removing all values. . /// -- line 3053 ---------------------------------------- -- line 3074 ---------------------------------------- . . // SAFETY: . // - `elems` comes directly from `as_mut_slice` and is therefore valid. . // - Setting `self.len` before calling `drop_in_place` means that, . // if an element's `Drop` impl panics, the vector's `Drop` impl will . // do nothing (leaking the rest of the elements) instead of dropping . // some twice. . unsafe { 6,409 ( 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 { 55,824 ( 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 { 60,268 ( 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. 29,201 ( 0.00%) fn clone(&self) -> Self { . let alloc = self.allocator().clone(); 153 ( 0.00%) <[T]>::to_vec_in(&**self, alloc) 37,261 ( 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) { 70 ( 0.00%) Hash::hash(&**self, state) . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_index", issue = "143775")] . const impl, A: Allocator> Index for Vec { . type Output = I::Output; . -- line 3931 ---------------------------------------- -- line 3988 ---------------------------------------- . /// LONG_LIVED.lock().unwrap().push(result); . /// } . /// ``` . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "rust1", since = "1.0.0")] . impl FromIterator for Vec { . #[inline] . fn from_iter>(iter: I) -> Vec { 4,751 ( 0.00%) >::from_iter(iter.into_iter()) 363 ( 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<(rustc_span::span_encoding::Span, alloc::string::String), core::iter::adapters::GenericShunt>, clippy_lints::lifetimes::elision_suggestions::{closure#1}>, core::option::Option>>>::from_iter (1x) . } . } . . #[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(); 247 ( 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) { 41 ( 0.00%) >::spec_extend(self, iter.into_iter()) 6,723 ( 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 4084 ---------------------------------------- . } . } . } . . impl Vec { . // leaf method to which various SpecFrom/SpecExtend implementations delegate when . // they have no further optimizations to apply . #[cfg(not(no_global_oom_handling))] 352 ( 0.00%) 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); . // } 162,099 ( 0.00%) while let Some(element) = iterator.next() { 11,596,852 ( 0.32%) => /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 (25,744x) . let len = self.len(); 51,301 ( 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 25,635 ( 0.00%) self.set_len(len + 1); . } . } 280 ( 0.00%) } . . // 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) { . let (low, high) = iterator.size_hint(); . if let Some(additional) = high { . debug_assert_eq!( -- line 4122 ---------------------------------------- -- 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); 302 ( 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 . { 15,912 ( 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 35,092 ( 0.00%) self.as_mut_ptr().cast_slice(self.len).drop_in_place() . } . // RawVec handles deallocation 19,938 ( 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 ---------------------------------------- 331,178 ( 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_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. 78,521 ( 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); 157,020 ( 0.00%) let index = match current { . 0 => return None, . // Treat "initializing" as actually just not initialized at all. . // The only reason this is a separate state is that `complete` calls could race and . // we can't allow that, but from load perspective there's no difference. . 1 => return None, 74,536 ( 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. 52,070 ( 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) } { 32,963 ( 0.00%) Some((value, idx)) => Some((value, I::new(idx as usize))), 327 ( 0.00%) None => None, . } 851 ( 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`. 163,751 ( 0.00%) if flat < Self::BUCKET_0_CAPACITY { . return (Self::Bucket00, flat); . } . . // General-case conversion for a non-zero bucket index. . // . // | bucket | slot . // flat | ilog2 | index | offset . // ------------------------------ . // 4096 | 12 | 1 | 0 . // 4097 | 12 | 1 | 1 . // ... . // 8191 | 12 | 1 | 4095 . // 8192 | 13 | 2 | 0 . let highest_bit_pos = flat.ilog2() as usize; . let bucket_index = 49,160 ( 0.00%) BucketIndex::from_raw(highest_bit_pos - Self::NONZERO_BUCKET_SHIFT_ADJUST); . . // Clear the highest-set bit (which selects the bucket) to get the . // slot offset within this bucket. 73,773 ( 0.00%) let slot_offset = flat - (1 << highest_bit_pos); . . (bucket_index, slot_offset) . } . . #[inline(always)] . fn iter_all() -> impl ExactSizeIterator { . (0usize..BUCKETS).map(BucketIndex::from_raw) . } -- line 480 ---------------------------------------- 150,595 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/matches/match_wild_err_arm.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use clippy_utils::visitors::is_local_used; . use clippy_utils::{is_in_const_context, is_wild, peel_blocks_with_stmt}; . use rustc_hir::{Arm, Expr, PatKind, intravisit}; . use rustc_lint::LateContext; . use rustc_span::symbol::{kw, sym}; . . use super::MATCH_WILD_ERR_ARM; . 10,142 ( 0.00%) pub(crate) fn check<'tcx>(cx: &LateContext<'tcx>, ex: &Expr<'tcx>, arms: &[Arm<'tcx>]) { . // `unwrap`/`expect` is not (yet) const, so we want to allow this in const contexts for now 2,766 ( 0.00%) if is_in_const_context(cx) { 302,550 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (922x) . return; . } . 1,838 ( 0.00%) let ex_ty = cx.typeck_results().expr_ty(ex).peel_refs(); 36,808 ( 0.00%) => ???:::expr_ty (919x) 1,820 ( 0.00%) if ex_ty.is_diag_item(cx, sym::Result) { . for arm in arms { 798 ( 0.00%) if let PatKind::TupleStruct(ref path, inner, _) = arm.pat.kind { 532 ( 0.00%) let path_str = rustc_hir_pretty::qpath_to_string( 102,410 ( 0.00%) => ???:rustc_hir_pretty::qpath_to_string (133x) . #[allow(trivial_casts)] 399 ( 0.00%) &(&cx.tcx as &dyn intravisit::HirTyCtxt<'_>), . path, . ); 64 ( 0.00%) if path_str == "Err" { . let mut matching_wild = inner.iter().any(is_wild); 64 ( 0.00%) let mut ident_bind_name = kw::Underscore; . if !matching_wild { . // Looking for unused bindings (i.e.: `_e`) . for pat in inner { 412 ( 0.00%) if let PatKind::Binding(_, id, ident, None) = pat.kind 114 ( 0.00%) && ident.as_str().starts_with('_') 1,216 ( 0.00%) => ???:::as_str (38x) 105 ( 0.00%) && !is_local_used(cx, arm.body, id) . { 42 ( 0.00%) ident_bind_name = ident.name; . matching_wild = true; . } . } . } 99 ( 0.00%) if matching_wild 218 ( 0.00%) && let Some(macro_call) = root_macro_call(peel_blocks_with_stmt(arm.body).span) 1,776 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::root_macro_call (31x) 4 ( 0.00%) && is_panic(cx, macro_call.def_id) 96 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::is_panic (1x) . { . // `Err(_)` or `Err(_e)` arm with `panic!` found . span_lint_and_note( . cx, . MATCH_WILD_ERR_ARM, 1 ( 0.00%) arm.pat.span, 4 ( 0.00%) format!("`Err({ident_bind_name})` matches all errors"), 1 ( 0.00%) None, . "match each error separately or use the error output, or use `.expect(msg)` if the error case is unreachable", . ); . } . } . } . } . } 7,376 ( 0.00%) } 218 ( 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 { 17,521 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, impl_item: &'tcx ImplItem<'_>) { 5,006 ( 0.00%) match impl_item.kind { . ImplItemKind::Fn(ref sig, _) => { 7,206 ( 0.00%) if sig.decl.implicit_self().has_implicit_self() { 19,216 ( 0.00%) => ???:::implicit_self (2,402x) . return; . } . }, . _ => return, . } . 2,274 ( 0.00%) let parent = cx.tcx.hir_get_parent_item(impl_item.hir_id()).def_id; 51,443 ( 0.00%) => ???:::hir_get_parent_item (379x) 1,516 ( 0.00%) let item = cx.tcx.hir_expect_item(parent); 23,637 ( 0.00%) => ???:::hir_expect_item (379x) 758 ( 0.00%) let self_ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip(); 758 ( 0.00%) let ret_ty = return_ty(cx, impl_item.owner_id); 41,801 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::return_ty (379x) . . // Do not check trait impls 1,516 ( 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() { 634 ( 0.00%) if !contains_adt_constructor(ret_ty, self_adt) { 92,442 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::contains_adt_constructor (317x) . 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() 867 ( 0.00%) && let Node::Item(x) = cx.tcx.hir_node_by_def_id(self_local_did) 867 ( 0.00%) && let Some(type_ident) = x.kind.ident() 3,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/hir.rs:::ident (289x) 578 ( 0.00%) && let type_name = type_ident.name.as_str().to_lowercase() 50,274 ( 0.00%) => ???:::to_lowercase (289x) 299 ( 0.00%) && (impl_item.ident.name.as_str() == type_name 587 ( 0.00%) || impl_item.ident.name.as_str().replace('_', "") == type_name) 119,513 ( 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:: (289x) . { . span_lint( . cx, . SELF_NAMED_CONSTRUCTORS, . impl_item.span, . format!("constructor `{}` has the same name as the type", impl_item.ident.name), . ); . } 20,024 ( 0.00%) } . } 6,134 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/peekable.rs -------------------------------------------------------------------------------- Ir -- line 17 ---------------------------------------- . pub struct Peekable { . iter: I, . /// Remember a peeked value, even if it was None. . peeked: Option>, . } . . impl Peekable { . pub(in crate::iter) const fn new(iter: I) -> Peekable { 4,106 ( 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 { 101,000 ( 0.00%) match self.peeked.take() { 23,310 ( 0.00%) Some(v) => v, 146,658 ( 0.00%) None => self.iter.next(), 9,543,666 ( 0.26%) => /rust/deps/pulldown-cmark-0.11.3/src/parse.rs: as core::iter::traits::iterator::Iterator>::next (48,886x) . } . } . . #[inline] . #[rustc_inherit_overflow_checks] . fn count(mut self) -> usize { . match self.peeked.take() { . Some(None) => 0, -- line 49 ---------------------------------------- -- line 210 ---------------------------------------- . /// // After the iterator is finished, so is `peek()` . /// assert_eq!(iter.peek(), None); . /// assert_eq!(iter.next(), None); . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . pub fn peek(&mut self) -> Option<&I::Item> { . let iter = &mut self.iter; 3,658 ( 0.00%) self.peeked.get_or_insert_with(|| iter.next()).as_ref() 789,698 ( 0.02%) => /rust/deps/pulldown-cmark-0.11.3/src/parse.rs: as core::iter::traits::iterator::Iterator>::next (1,554x) . } . . /// Returns a mutable reference to the next() value without advancing the iterator. . /// . /// Like [`next`], if there is a value, it is wrapped in a `Some(T)`. . /// But if the iteration is over, `None` is returned. . /// . /// Because `peek_mut()` returns a reference, and many iterators iterate over -- line 226 ---------------------------------------- 59,537 ( 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 { 9,092 ( 0.00%) ControlFlow::Continue(output) . } . . #[inline] . fn branch(self) -> ControlFlow { 189,247 ( 0.01%) match self { . ControlFlow::Continue(c) => ControlFlow::Continue(c), 483 ( 0.00%) 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 { 231,757 ( 0.01%) 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 { 1,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, . { 69,800 ( 0.00%) match self { 4,415 ( 0.00%) ControlFlow::Continue(..) => None, 219,172 ( 0.01%) 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, . { 150 ( 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 ---------------------------------------- -- line 427 ---------------------------------------- . impl ControlFlow { . /// Creates a `ControlFlow` from any type implementing `Try`. . #[inline] . #[rustc_const_unstable(feature = "const_control_flow", issue = "148739")] . pub(crate) const fn from_try(r: R) -> Self . where . R: [const] ops::Try, . { 36 ( 0.00%) match R::branch(r) { . ControlFlow::Continue(v) => ControlFlow::Continue(v), . ControlFlow::Break(v) => ControlFlow::Break(R::from_residual(v)), . } . } . . /// Converts a `ControlFlow` into any type implementing `Try`. . #[inline] . #[rustc_const_unstable(feature = "const_control_flow", issue = "148739")] . pub(crate) const fn into_try(self) -> R . where . R: [const] ops::Try, . { 108 ( 0.00%) match self { . ControlFlow::Continue(v) => R::from_output(v), 2,982 ( 0.00%) ControlFlow::Break(v) => v, . } . } . } 95,592 ( 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}; . 559,314 ( 0.02%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 124,292 ( 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. 94,491 ( 0.00%) if is_questionmark_desugar_marked_call(expr) { . return; . } 375,928 ( 0.01%) if let Node::Expr(parent_expr) = cx.tcx.parent_hir_node(expr.hir_id) 4,697,992 ( 0.13%) => ???:::parent_hir_node (43,110x) 20,742 ( 0.00%) && is_questionmark_desugar_marked_call(parent_expr) . { . return; . } . 165,250 ( 0.00%) let (receiver, args) = match expr.kind { . ExprKind::Call(_, args) => (None, args), 23,824 ( 0.00%) ExprKind::MethodCall(_, receiver, args, _) => (Some(receiver), args), . _ => return, . }; . . let args_to_recover = receiver . .into_iter() . .chain(args) . .filter(|arg| { 23,741 ( 0.00%) if cx.typeck_results().expr_ty(arg).is_unit() && !utils::is_unit_literal(arg) { 472,896 ( 0.01%) => ???:::expr_ty (11,792x) . !matches!( . &arg.kind, . ExprKind::Match(.., MatchSource::TryDesugar(_)) | ExprKind::Path(..) . ) . } else { . false . } . }) . .collect::>(); 8,521 ( 0.00%) if !args_to_recover.is_empty() && !is_from_proc_macro(cx, expr) { . lint_unit_args(cx, expr, args_to_recover.as_slice()); . } 497,168 ( 0.01%) } . . fn is_questionmark_desugar_marked_call(expr: &Expr<'_>) -> bool { . use rustc_span::hygiene::DesugaringKind; 105,206 ( 0.00%) if let ExprKind::Call(callee, _) = expr.kind { 29,013 ( 0.00%) callee.span.is_desugaring(DesugaringKind::QuestionMark) 941,070 ( 0.03%) => ???:::is_desugaring (9,671x) . } 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 ---------------------------------------- 24,737 ( 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 { 248,584 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 139,662 ( 0.00%) if let ExprKind::MethodCall(name, recv, [_], _) = expr.kind 2,186 ( 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, . ); . } . } 248,584 ( 0.01%) } . } -------------------------------------------------------------------------------- -- 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; . 11,830 ( 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<'_>, . ) { 1,690 ( 0.00%) if op == hir::BinOpKind::Div 66 ( 0.00%) && cx.typeck_results().expr_ty(left).is_integral() 880 ( 0.00%) => ???:::expr_ty (22x) 66 ( 0.00%) && let right_ty = cx.typeck_results().expr_ty(right) 892 ( 0.00%) => ???:::expr_ty (22x) . && (right_ty.is_integral() || right_ty.is_diag_item(cx, sym::NonZero)) . { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] 44 ( 0.00%) 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"); . }); . } 13,520 ( 0.00%) } 66 ( 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(); 21,458 ( 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 . if unsafe { *lhs.add(idx) != *rhs.add(idx) } { . return false; . } . idx += 1; . } . . true -- line 139 ---------------------------------------- -- 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); 634,702 ( 0.02%) compare_bytes(lhs as _, rhs as _, size) == 0 810 ( 0.00%) => ???:0x0000000000173660 (39x) . } . } . } . . #[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 { 40 ( 0.00%) x.iter().any(|y| *y == *self) 40 ( 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 ---------------------------------------- -- line 429 ---------------------------------------- . // SIMD . let mut chunks = arr.chunks_exact(LANE_COUNT); . for chunk in &mut chunks { . if chunk.iter().fold(false, |acc, x| acc | (*x == *self)) { . return true; . } . } . // Scalar remainder 270 ( 0.00%) return chunks.remainder().iter().any(|x| *x == *self); . } . } . )* . }; . } . . impl_slice_contains!(u16, u32, u64, i16, i32, i64, f32, f64, usize, isize, char); 90,704 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/ifs/same_functions_in_if_cond.rs -------------------------------------------------------------------------------- Ir -- line 2 ---------------------------------------- . use clippy_utils::{SpanlessEq, eq_expr_value, hash_expr, search_same}; . use rustc_hir::Expr; . use rustc_lint::LateContext; . use rustc_span::SyntaxContext; . . use super::SAME_FUNCTIONS_IN_IF_CONDITION; . . /// Implementation of `SAME_FUNCTIONS_IN_IF_CONDITION`. 7,280 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, conds: &[&Expr<'_>]) { 1,316 ( 0.00%) let eq: &dyn Fn(&&Expr<'_>, &&Expr<'_>) -> bool = &|&lhs, &rhs| -> bool { . // Do not lint if any expr originates from a macro 232 ( 0.00%) if lhs.span.from_expansion() || rhs.span.from_expansion() { . return false; . } . // Do not spawn warning if `IFS_SAME_COND` already produced it. 522 ( 0.00%) if eq_expr_value(cx, SyntaxContext::root(), lhs, rhs) { 112,134 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_expr_value (58x) . return false; . } 348 ( 0.00%) SpanlessEq::new(cx).eq_expr(SyntaxContext::root(), lhs, rhs) 115,641 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (58x) 406 ( 0.00%) }; . 8,269 ( 0.00%) for group in search_same(conds, |e| hash_expr(cx, e), eq) { 377,668 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::search_same::<&rustc_hir::hir::Expr, clippy_lints::ifs::same_functions_in_if_cond::check::{closure#1}, &dyn for<'a, 'b, 'c, 'd, 'e, 'f> core::ops::function::Fn<(&'a &'b rustc_hir::hir::Expr<'c>, &'d &'e rustc_hir::hir::Expr<'f>), Output = bool>> (910x) . let spans: Vec<_> = group.into_iter().map(|expr| expr.span).collect(); . span_lint( . cx, . SAME_FUNCTIONS_IN_IF_CONDITION, . spans, . "these `if` branches have the same function call", . ); . } 7,280 ( 0.00%) } 1,820 ( 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 141,251 ( 0.00%) if let ExprKind::Call(path, [arg]) = expr.kind 13,605 ( 0.00%) && let ExprKind::Path(ref qpath) = path.kind 18,140 ( 0.00%) && let Some(def_id) = cx.qpath_res(qpath, path.hir_id).opt_def_id() 157,518 ( 0.00%) => ???:::qpath_res (4,535x) 22,200 ( 0.00%) && let Some(fn_name) = cx.tcx.get_diagnostic_name(def_id) 337,781 ( 0.01%) => ???:::get_diagnostic_name (4,440x) . { 549 ( 0.00%) let arg_ty = cx.typeck_results().expr_ty(arg); 7,360 ( 0.00%) => ???:::expr_ty (183x) 915 ( 0.00%) let is_copy = is_copy(cx, arg_ty); 194,610 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_copy (183x) 335 ( 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 735 ( 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, 3 ( 0.00%) sym::mem_drop if arg_ty.is_lang_item(cx, LangItem::ManuallyDrop) => return, . sym::mem_drop 27 ( 0.00%) if !(arg_ty.needs_drop(cx.tcx, cx.typing_env()) 189,936 ( 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/util.rs:::needs_drop (3x) 90 ( 0.00%) => ???:::typing_env (3x) . || is_must_use_func_call(cx, arg) . || opt_must_use_path(cx, arg_ty).is_some() . || drop_is_single_call_in_arm) => . { . (DROP_NON_DROP, DROP_NON_DROP_SUMMARY.into(), Some(arg.span)) . }, . sym::mem_forget => { . if arg_ty.needs_drop(cx.tcx, cx.typing_env()) { -- line 107 ---------------------------------------- -- 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); . } . }); . } 497,168 ( 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 { 549 ( 0.00%) if matches!(arg.kind, ExprKind::Call(..) | ExprKind::MethodCall(..)) 191 ( 0.00%) && let Node::Arm(Arm { body, .. }) = cx.tcx.parent_hir_node(drop_expr.hir_id) 4,118 ( 0.00%) => ???:::parent_hir_node (38x) . { 1 ( 0.00%) return body.hir_id == drop_expr.hir_id; . } . false . } 13,649 ( 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 { 621,460 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 254 ( 0.00%) let (let_pat, let_expr, ifwhile) = 248,690 ( 0.01%) if let Some(higher::IfLet { let_pat, let_expr, .. }) = higher::IfLet::hir(cx, expr) { 342,285 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (62,146x) . (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; . }; . 466 ( 0.00%) if let ExprKind::MethodCall(ok_path, recv, [], ..) = let_expr.kind //check is expr.ok() has type Result.ok(, _) 38 ( 0.00%) && ok_path.ident.name == sym::ok . && cx.typeck_results().expr_ty(recv).is_diag_item(cx, sym::Result) . && let Some([ok_pat]) = as_some_pattern(cx, let_pat) //get operation . && let ctxt = expr.span.ctxt() . && let_expr.span.ctxt() == ctxt . && let_pat.span.ctxt() == ctxt . { . let mut applicability = Applicability::MachineApplicable; . let some_expr_string = snippet_with_context(cx, ok_pat.span, ctxt, "", &mut applicability).0; -- line 66 ---------------------------------------- -- 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, . ); . } 497,168 ( 0.01%) } . } 212 ( 0.00%) -------------------------------------------------------------------------------- -- 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) { 84,006 ( 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 { 230,800 ( 0.01%) fn check_attribute(&mut self, cx: &EarlyContext<'_>, attribute: &ast::Attribute) { . Self::warn_if_tabs_in_doc(cx, attribute); 230,800 ( 0.01%) } . } . . /// . /// 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 ---------------------------------------- 26,306 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/unwrap_expect_used.rs -------------------------------------------------------------------------------- Ir -- line 22 ---------------------------------------- . (Variant::Unwrap, true) => "unwrap_err", . (Variant::Unwrap, false) => "unwrap", . (Variant::Expect, true) => "expect_err", . (Variant::Expect, false) => "expect", . } . } . . fn lint(self) -> &'static Lint { 2,827 ( 0.00%) match self { . Variant::Unwrap => UNWRAP_USED, . Variant::Expect => EXPECT_USED, . } . } . } . . /// Lint usage of `unwrap` or `unwrap_err` for `Result` and `unwrap()` for `Option` (and their . /// `expect` counterparts). . #[allow(clippy::too_many_arguments)] 3,108 ( 0.00%) pub(super) fn check( . cx: &LateContext<'_>, . expr: &Expr<'_>, . recv: &Expr<'_>, . is_err: bool, . allow_unwrap_in_consts: bool, . allow_unwrap_in_tests: bool, . unwrap_allowed_ids: &rustc_data_structures::fx::FxHashSet, . unwrap_allowed_aliases: &[rustc_hir::def_id::DefId], . variant: Variant, . ) { 777 ( 0.00%) let ty = cx.typeck_results().expr_ty(recv).peel_refs(); 10,372 ( 0.00%) => ???:::expr_ty (259x) . 2,304 ( 0.00%) let (kind, none_value, none_prefix) = match ty.opt_diag_name(cx) { 244 ( 0.00%) Some(sym::Option) if !is_err => ("an `Option`", "None", ""), . Some(sym::Result) 274 ( 0.00%) if let ty::Adt(_, substs) = ty.kind() 685 ( 0.00%) && let Some(t_or_e_ty) = substs[usize::from(!is_err)].as_type() => . { 414 ( 0.00%) if is_never_like(t_or_e_ty) { . return; . } . 270 ( 0.00%) ("a `Result`", if is_err { "Ok" } else { "Err" }, "an ") . }, . _ => return, . }; . 514 ( 0.00%) let method_suffix = if is_err { "_err" } else { "" }; . 1,490 ( 0.00%) if let ty::Adt(adt, _) = ty.kind() . && unwrap_allowed_ids.contains(&adt.did()) . { . return; . } . . for &def_id in unwrap_allowed_aliases { . let alias_ty = cx.tcx.type_of(def_id).instantiate_identity().skip_norm_wip(); . if let (ty::Adt(adt, substs), ty::Adt(alias_adt, alias_substs)) = (ty.kind(), alias_ty.kind()) -- line 78 ---------------------------------------- -- line 98 ---------------------------------------- . } . } . if all_match { . return; . } . } . } . 514 ( 0.00%) if allow_unwrap_in_tests && is_in_test(cx.tcx, expr.hir_id) { . return; . } . 2,056 ( 0.00%) if allow_unwrap_in_consts && is_inside_always_const_context(cx.tcx, expr.hir_id) { 216,886 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_inside_always_const_context (257x) . return; . } . 1,799 ( 0.00%) span_lint_and_then( 393,583 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (257x) . cx, . variant.lint(), 257 ( 0.00%) expr.span, 1,542 ( 0.00%) format!("used `{}()` on {kind} value", variant.method_name(is_err)), 2,313 ( 0.00%) |diag| { . diag.note(format!("if this value is {none_prefix}`{none_value}`, it will panic")); . . if variant == Variant::Unwrap && is_lint_allowed(cx, EXPECT_USED, expr.hir_id) { . diag.help(format!( . "consider using `expect{method_suffix}()` to provide a better panic message" . )); . } . }, . ); 2,072 ( 0.00%) } . . #[expect(clippy::too_many_arguments, clippy::fn_params_excessive_bools)] 19,299 ( 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; . }; 21,357 ( 0.00%) let Some((DefKind::AssocFn, def_id)) = cx.typeck_results().type_dependent_def(func.hir_id) else { 106,215 ( 0.00%) => ???:::type_dependent_def (2,379x) . return; . }; . 775 ( 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, . ); . }, . _ => (), . } 22,056 ( 0.00%) } 5,652 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/useless_concat.rs -------------------------------------------------------------------------------- Ir -- line 28 ---------------------------------------- . pub USELESS_CONCAT, . complexity, . "checks that the `concat` macro has at least two arguments" . } . . declare_lint_pass!(UselessConcat => [USELESS_CONCAT]); . . impl LateLintPass<'_> for UselessConcat { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { . // Check that the expression is generated by a macro. 143,328 ( 0.00%) if expr.span.from_expansion() . // Check that it's a string literal. 758 ( 0.00%) && let ExprKind::Lit(lit) = expr.kind 2,724 ( 0.00%) && let LitKind::Str(lit_s, _) = lit.node . // Get the direct parent of the expression. 3,790 ( 0.00%) && let Some(macro_call) = macro_backtrace(expr.span).next() . // Check if the `concat` macro from the `core` library. 5,306 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::macro_concat, macro_call.def_id) 75,806 ( 0.00%) => ???:::is_diagnostic_item (758x) . // We get the original code to parse it. 16 ( 0.00%) && let Some(original_code) = snippet_opt(cx, macro_call.span) 1,218 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::snippet_opt::<&rustc_lint::context::LateContext> (2x) . // 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. 20 ( 0.00%) && let mut parts = original_code.split('!') 2 ( 0.00%) && parts.next().is_some_and(|p| p.trim() == "concat") 2 ( 0.00%) && parts.next().is_some_and(|p| p.trim().starts_with('(')) . { . let mut literal = None; . let mut nb_commas = 0; . let mut nb_idents = 0; 24 ( 0.00%) for (token_kind, token_s, _) in tokenize_with_text(&original_code) { 120 ( 0.00%) match token_kind { . TokenKind::Eof => break, . TokenKind::Literal { .. } => { 2 ( 0.00%) if literal.is_some() { . return; . } . literal = Some(token_s); . }, . TokenKind::Ident => { 4 ( 0.00%) if token_s == "true" || token_s == "false" { . literal = Some(token_s); . } else { 4 ( 0.00%) nb_idents += 1; . } . }, . TokenKind::Comma => { . nb_commas += 1; 6 ( 0.00%) if nb_commas > 1 { . return; . } . }, . // We're inside a macro definition and we are manipulating something we likely . // shouldn't, so aborting. . TokenKind::Dollar => return, . _ => {}, . } -- line 87 ---------------------------------------- -- line 94 ---------------------------------------- . macro_call.span, . "unneeded use of `concat!` macro", . "replace with", . format!("{lit_s:?}"), . Applicability::MachineApplicable, . ); . } . } 497,168 ( 0.01%) } . } 38,884 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use rustc_hir::{Expr, ExprKind, GenericArg}; . use rustc_lint::LateContext; . use rustc_middle::ty::layout::LayoutOf as _; . use rustc_middle::ty::{self, Ty}; . . use super::CAST_PTR_ALIGNMENT; . . pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, cast_from: Ty<'tcx>, cast_to: Ty<'tcx>) { 156 ( 0.00%) lint_cast_ptr_alignment(cx, expr, cast_from, cast_to); 444 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs:clippy_lints::casts::cast_ptr_alignment::lint_cast_ptr_alignment (26x) . } . 310,730 ( 0.01%) pub(super) fn check_cast_method(cx: &LateContext<'_>, expr: &Expr<'_>) { 137,476 ( 0.00%) if let ExprKind::MethodCall(method_path, self_arg, [], _) = &expr.kind 7,492 ( 0.00%) && method_path.ident.name == sym::cast 27 ( 0.00%) && let Some(generic_args) = method_path.args 45 ( 0.00%) && let [GenericArg::Type(cast_to)] = generic_args.args . // There probably is no obvious reason to do this, just to be consistent with `as` cases. 45 ( 0.00%) && !is_hir_ty_cfg_dependant(cx, cast_to.as_unambig_ty()) 1,046 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_hir_ty_cfg_dependant (9x) . { 72 ( 0.00%) let (cast_from, cast_to) = (cx.typeck_results().expr_ty(self_arg), cx.typeck_results().expr_ty(expr)); 720 ( 0.00%) => ???:::expr_ty (18x) 90 ( 0.00%) lint_cast_ptr_alignment(cx, expr, cast_from, cast_to); 41,795 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs:clippy_lints::casts::cast_ptr_alignment::lint_cast_ptr_alignment (9x) . } 372,822 ( 0.01%) } . 280 ( 0.00%) fn lint_cast_ptr_alignment<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, cast_from: Ty<'tcx>, cast_to: Ty<'tcx>) { 70 ( 0.00%) if let ty::RawPtr(from_ptr_ty, _) = *cast_from.kind() 29 ( 0.00%) && let ty::RawPtr(to_ptr_ty, _) = *cast_to.kind() 27 ( 0.00%) && let Ok(from_layout) = cx.layout_of(from_ptr_ty) 27 ( 0.00%) && let Ok(to_layout) = cx.layout_of(to_ptr_ty) 9 ( 0.00%) && from_layout.align.abi < to_layout.align.abi . // with c_void, we inherently need to trust the user 25 ( 0.00%) && !is_c_void(cx, from_ptr_ty) 20 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_c_void (5x) . // when casting from a ZST, we don't know enough to properly lint . && !from_layout.is_zst() 25 ( 0.00%) && !is_used_as_unaligned(cx, expr) 1,420 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/casts/cast_ptr_alignment.rs:clippy_lints::casts::cast_ptr_alignment::is_used_as_unaligned (5x) 35 ( 0.00%) && !expr.span.in_external_macro(cx.tcx.sess.source_map()) 585 ( 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 (5x) . { . span_lint( . cx, . CAST_PTR_ALIGNMENT, . expr.span, 65 ( 0.00%) format!( . "casting from `{cast_from}` to a more-strictly-aligned pointer (`{cast_to}`) ({} < {} bytes)", 5 ( 0.00%) from_layout.align.bytes(), 5 ( 0.00%) to_layout.align.bytes(), . ), . ); . } 245 ( 0.00%) } . 40 ( 0.00%) fn is_used_as_unaligned(cx: &LateContext<'_>, e: &Expr<'_>) -> bool { 15 ( 0.00%) let Some(parent) = get_parent_expr(cx, e) else { 595 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (5x) . return false; . }; 25 ( 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 67 ---------------------------------------- . .skip_norm_wip() . .is_raw_ptr() . { . true . } else { . false . } . }, 20 ( 0.00%) ExprKind::Call(func, [arg, ..]) if arg.hir_id == e.hir_id => { 15 ( 0.00%) if let ExprKind::Path(path) = &func.kind 25 ( 0.00%) && let Some(def_id) = cx.qpath_res(path, func.hir_id).opt_def_id() 115 ( 0.00%) => ???:::qpath_res (5x) 45 ( 0.00%) && let Some(name) = cx.tcx.get_diagnostic_name(def_id) 435 ( 0.00%) => ???:::get_diagnostic_name (5x) . && matches!( . name, . sym::ptr_write_unaligned . | sym::ptr_read_unaligned . | sym::intrinsics_unaligned_volatile_load . | sym::intrinsics_unaligned_volatile_store . ) . { . true . } else { . false . } . }, . _ => false, . } 35 ( 0.00%) } 63 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/utils/attr_collector.rs -------------------------------------------------------------------------------- Ir . use std::mem; . use std::sync::{Arc, OnceLock}; . . use rustc_ast::{Attribute, Crate}; . use rustc_lint::{EarlyContext, EarlyLintPass}; . use rustc_session::impl_lint_pass; . use rustc_span::Span; . 2 ( 0.00%) #[derive(Clone, Default)] . pub struct AttrStorage(pub Arc>>); . . pub struct AttrCollector { . storage: AttrStorage, . attrs: Vec, . } . . impl AttrCollector { . pub fn new(storage: AttrStorage) -> Self { 4 ( 0.00%) Self { . storage, . attrs: Vec::new(), . } . } . } . . impl_lint_pass!(AttrCollector => []); . . impl EarlyLintPass for AttrCollector { . fn check_attribute(&mut self, _cx: &EarlyContext<'_>, attr: &Attribute) { 28,850 ( 0.00%) self.attrs.push(attr.span); . } . . fn check_crate_post(&mut self, _: &EarlyContext<'_>, _: &Crate) { . self.storage . .0 . .set(mem::take(&mut self.attrs)) . .expect("should only be called once"); . } -- line 38 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/hash/mod.rs -------------------------------------------------------------------------------- Ir -- line 230 ---------------------------------------- . /// [`make_contiguous`]: ../../std/collections/struct.VecDeque.html#method.make_contiguous . /// [`hash`]: Hash::hash . /// [`hash_slice`]: Hash::hash_slice . #[stable(feature = "hash_slice", since = "1.3.0")] . fn hash_slice(data: &[Self], state: &mut H) . where . Self: Sized, . { 70 ( 0.00%) for piece in data { 70 ( 0.00%) piece.hash(state) . } . } . } . . // Separate module to reexport the macro `Hash` from prelude without the trait `Hash`. . pub(crate) mod macros { . /// Derive macro generating an impl of the trait `Hash`. . #[rustc_builtin_macro] -- line 247 ---------------------------------------- -- line 355 ---------------------------------------- . /// [`Hasher::write_length_prefix`] before sequences that need it. . #[stable(feature = "rust1", since = "1.0.0")] . fn write(&mut self, bytes: &[u8]); . . /// Writes a single `u8` into this hasher. . #[inline] . #[stable(feature = "hasher_write", since = "1.3.0")] . fn write_u8(&mut self, i: u8) { 600 ( 0.00%) self.write(&[i]) 4,697 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/hash/sip.rs: as core::hash::Hasher>::write (118x) . } . /// Writes a single `u16` into this hasher. . #[inline] . #[stable(feature = "hasher_write", since = "1.3.0")] . fn write_u16(&mut self, i: u16) { . self.write(&i.to_ne_bytes()) . } . /// Writes a single `u32` into this hasher. -- line 371 ---------------------------------------- -- line 686 ---------------------------------------- . /// bh.hash_one(OrderAmbivalentPair(2, 1)) . /// ); . /// assert_eq!( . /// bh.hash_one(OrderAmbivalentPair(10, 2)), . /// bh.hash_one(&OrderAmbivalentPair(2, 10)) . /// ); . /// ``` . #[stable(feature = "build_hasher_simple_hash_one", since = "1.71.0")] 272 ( 0.00%) fn hash_one(&self, x: T) -> u64 . where . Self: Sized, . Self::Hasher: Hasher, . { 152 ( 0.00%) let mut hasher = self.build_hasher(); . x.hash(&mut hasher); . hasher.finish() 424 ( 0.00%) } . } . . /// Used to create a default [`BuildHasher`] instance for types that implement . /// [`Hasher`] and [`Default`]. . /// . /// `BuildHasherDefault` can be used when a type `H` implements [`Hasher`] and . /// [`Default`], and you need a corresponding [`BuildHasher`] instance, but none is . /// defined. -- line 710 ---------------------------------------- -- line 805 ---------------------------------------- . use crate::slice; . . macro_rules! impl_write { . ($(($ty:ident, $meth:ident),)*) => {$( . #[stable(feature = "rust1", since = "1.0.0")] . impl Hash for $ty { . #[inline] . fn hash(&self, state: &mut H) { 1,361 ( 0.00%) state.$meth(*self) . } . . #[inline] . fn hash_slice(data: &[$ty], state: &mut H) { . let newlen = size_of_val(data); . let ptr = data.as_ptr() as *const u8; . // SAFETY: `ptr` is valid and aligned, as this macro is only used . // for numeric primitives which have no padding. The new slice only -- line 821 ---------------------------------------- -- line 887 ---------------------------------------- . maybe_tuple_doc! { . $($name)+ @ . #[stable(feature = "rust1", since = "1.0.0")] . impl<$($name: Hash),+> Hash for ($($name,)+) { . #[allow(non_snake_case)] . #[inline] . fn hash(&self, state: &mut S) { . let ($(ref $name,)+) = *self; 586 ( 0.00%) $($name.hash(state);)+ . } . } . } . ); . } . . macro_rules! maybe_tuple_doc { . ($a:ident @ #[$meta:meta] $item:item) => { -- line 903 ---------------------------------------- -- line 935 ---------------------------------------- . Hash::hash_slice(self, state) . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl Hash for &T { . #[inline] . fn hash(&self, state: &mut H) { 61,633 ( 0.00%) (**self).hash(state); . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl Hash for &mut T { . #[inline] . fn hash(&self, state: &mut H) { . (**self).hash(state); -- line 951 ---------------------------------------- 614 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/matches/infallible_destructuring_match.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use clippy_utils::source::snippet_with_applicability; . use clippy_utils::{peel_blocks, strip_pat_refs}; . use rustc_errors::Applicability; . use rustc_hir::{ExprKind, LetStmt, MatchSource, PatKind, QPath}; . use rustc_lint::LateContext; . . use super::INFALLIBLE_DESTRUCTURING_MATCH; . 14,462 ( 0.00%) pub(crate) fn check(cx: &LateContext<'_>, local: &LetStmt<'_>) -> bool { . // turn this: . // . // let local = match target { . // Variant(binding arg) => { arg } . // }; . // . // into this: . // . // let Variant(binding local) = target; 4,132 ( 0.00%) if !local.span.from_expansion() 4,548 ( 0.00%) && let Some(expr) = local.init 3,730 ( 0.00%) && let ExprKind::Match(target, [arm], MatchSource::Normal) = expr.kind 2 ( 0.00%) && arm.guard.is_none() 6 ( 0.00%) && let PatKind::TupleStruct(QPath::Resolved(None, variant_name), [arg_lhs], _) = arm.pat.kind . && let PatKind::Binding(binding, arg_lhs, ..) = strip_pat_refs(arg_lhs).kind . && let arg_rhs = peel_blocks(arm.body) . && Some(arg_lhs) == arg_rhs.res_local_id() . { . let mut applicability = Applicability::MachineApplicable; . span_lint_and_sugg( . cx, . INFALLIBLE_DESTRUCTURING_MATCH, -- line 33 ---------------------------------------- -- line 41 ---------------------------------------- . snippet_with_applicability(cx, local.pat.span, "..", &mut applicability), . snippet_with_applicability(cx, target.span, "..", &mut applicability), . ), . applicability, . ); . return true; . } . false 16,528 ( 0.00%) } 2,066 ( 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) { 105,488 ( 0.00%) if let ExprKind::MethodCall(MethodCall { seg, receiver, .. }) = &expr.kind 32,536 ( 0.00%) && matches!(seg.ident.name, sym::expect | sym::unwrap) 1,578 ( 0.00%) && is_direct_expn_of(receiver.span, sym::option_env).is_some() 6,461 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_direct_expn_of (263x) . { . span_lint_and_help( . cx, . OPTION_ENV_UNWRAP, . expr.span, . "this will panic at run-time if the environment variable doesn't exist at compile-time", . None, . "consider using the `env!` macro instead", -- line 48 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_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 { 80,141 ( 0.00%) self.def_key(id).parent.map(|index| DefId { index, ..id }) 17,100 ( 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:: (171x) . } . . #[inline] . #[track_caller] 16 ( 0.00%) pub fn parent(self, id: DefId) -> DefId { . match self.opt_parent(id) { . Some(id) => id, . // not `unwrap_or_else` to avoid breaking caller tracking . None => bug!("{id:?} doesn't have a parent"), . } 8 ( 0.00%) } . . #[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] 2,080 ( 0.00%) pub fn local_parent(self, id: impl Into) -> LocalDefId { . self.parent(id.into().to_def_id()).expect_local() 780 ( 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 527 ---------------------------------------- . } . } . . pub fn is_descendant_of( . self, . descendant: impl Into, . ancestor: impl Into, . ) -> bool { 4 ( 0.00%) matches!( 4 ( 0.00%) self.def_id_partial_cmp(descendant.into(), ancestor.into()), 134 ( 0.00%) => ???:::def_id_partial_cmp (2x) . Some(Ordering::Less | Ordering::Equal) . ) . } . } . . impl Visibility { . pub fn is_public(self) -> bool { 4,166 ( 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 556 ---------------------------------------- . pub fn to_mod_id(self) -> Visibility { . self.map_id(LocalModId::to_mod_id) . } . } . . impl> Visibility { . /// Returns `true` if an item with this visibility is accessible from the given module. . pub fn is_accessible_from(self, module: impl Into, tcx: TyCtxt<'_>) -> bool { 4 ( 0.00%) match self { . // Public items are visible everywhere. . Visibility::Public => true, . Visibility::Restricted(id) => tcx.is_descendant_of(module, id), . } . } . . pub fn partial_cmp( . self, -- line 572 ---------------------------------------- -- line 635 ---------------------------------------- . // the types of AST nodes. . #[derive(Copy, Clone, PartialEq, Eq, Hash)] . pub struct CReaderCacheKey { . pub cnum: Option, . pub pos: usize, . } . . /// Use this rather than `TyKind`, whenever possible. 17 ( 0.00%) #[derive(Copy, Clone, PartialEq, Eq, Hash, StableHash)] . #[rustc_diagnostic_item = "Ty"] . #[rustc_pass_by_value] . pub struct Ty<'tcx>(Interned<'tcx, WithCachedTypeInfo>>); . . impl<'tcx> rustc_type_ir::inherent::IntoKind for Ty<'tcx> { . type Kind = TyKind<'tcx>; . . fn kind(self) -> TyKind<'tcx> { 4,724 ( 0.00%) *self.kind() . } . } . . impl<'tcx> rustc_type_ir::Flags for Ty<'tcx> { . fn flags(&self) -> TypeFlags { 5,215 ( 0.00%) self.0.flags . } . . fn outer_exclusive_binder(&self) -> DebruijnIndex { 92 ( 0.00%) self.0.outer_exclusive_binder . } . } . . /// The crate outlives map is computed during typeck and contains the . /// outlives of every item in the local crate. You should not use it . /// directly, because to do so will make your pass dependent on the . /// HIR of every item in the local crate. Instead, use . /// `tcx.inferred_outlives_of()` to get the outlives for a *particular* -- line 670 ---------------------------------------- -- line 771 ---------------------------------------- . res.pack() . } . } . . impl<'tcx> Term<'tcx> { . #[inline] . pub fn kind(self) -> TermKind<'tcx> { . let ptr = 168 ( 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 { 298 ( 0.00%) match self.ptr.addr().get() & TAG_MASK { . TYPE_TAG => TermKind::Ty(Ty(Interned::new_unchecked( . ptr.cast::>>().as_ref(), . ))), . CONST_TAG => TermKind::Const(ty::Const(Interned::new_unchecked( . ptr.cast::>>().as_ref(), . ))), . _ => core::intrinsics::unreachable(), . } -- line 792 ---------------------------------------- -- 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,384 ( 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 { 5,108 ( 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. 12,893 ( 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()) 10,257 ( 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" . ); */ 688 ( 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> { 459 ( 0.00%) pub typing_env: TypingEnv<'tcx>, 26 ( 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 1368 ---------------------------------------- . #[derive(Copy, Clone, Debug, StableHash, Encodable, Decodable)] . pub struct AsyncDestructor { . /// The `DefId` of the `impl AsyncDrop` . pub impl_did: DefId, . } . . #[derive(Clone, Copy, PartialEq, Eq, StableHash, TyEncodable, TyDecodable)] . pub struct VariantFlags(u8); 2 ( 0.00%) bitflags::bitflags! { . impl VariantFlags: u8 { . const NO_VARIANT_FLAGS = 0; . /// Indicates whether the field list of this variant is `#[non_exhaustive]`. . const IS_FIELD_LIST_NON_EXHAUSTIVE = 1 << 0; . } . } . rustc_data_structures::external_bitflags_debug! { VariantFlags } . -- line 1384 ---------------------------------------- -- line 1456 ---------------------------------------- . pub fn is_field_list_non_exhaustive(&self) -> bool { . self.flags.intersects(VariantFlags::IS_FIELD_LIST_NON_EXHAUSTIVE) . } . . /// Returns `true` if the field list of this variant is `#[non_exhaustive]` . /// and the type has been defined in another crate. . #[inline] . pub fn field_list_has_applicable_non_exhaustive(&self) -> bool { 24 ( 0.00%) self.is_field_list_non_exhaustive() && !self.def_id.is_local() . } . . /// Computes the `Ident` of this variant by looking up the `Span` . pub fn ident(&self, tcx: TyCtxt<'_>) -> Ident { . Ident::new(self.name, tcx.def_ident_span(self.def_id).unwrap()) . } . . /// Was this variant obtained as part of recovering from a syntactic error? -- line 1472 ---------------------------------------- -- line 1477 ---------------------------------------- . . #[inline] . pub fn ctor_kind(&self) -> Option { . self.ctor.map(|(kind, _)| kind) . } . . #[inline] . pub fn ctor_def_id(&self) -> Option { 79 ( 0.00%) self.ctor.map(|(_, def_id)| def_id) . } . . /// Returns the one field in this variant. . /// . /// `panic!`s if there are no fields or multiple fields. . #[inline] . pub fn single_field(&self) -> &FieldDef { . assert!(self.fields.len() == 1); -- line 1493 ---------------------------------------- -- 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. 44,212 ( 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 { 18,948 ( 0.00%) let def_key = self.def_key(def_id); 515,094 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/context.rs:::def_key:: (6,316x) 37,896 ( 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(), . } . } 37,896 ( 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 24 ( 0.00%) pub fn item_name(self, id: impl IntoQueryKey) -> Symbol { . let id = id.into_query_key(); 20,474 ( 0.00%) self.opt_item_name(id).unwrap_or_else(|| { 20,736 ( 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:: (162x) . bug!("item_name: no name for {:?}", self.def_path(id)); . }) 16 ( 0.00%) } . . /// 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 { . let def_id = def_id.into_query_key(); . let def = self.opt_item_name(def_id)?; . let span = self -- line 1832 ---------------------------------------- -- 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)] 5,642 ( 0.00%) self.get_all_attrs(did).iter().filter(move |a: &&hir::Attribute| a.has_name(attr)) 413,513 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::get_all_attrs:: (2,821x) . } . . /// 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."] 25,722 ( 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() { 8,571 ( 0.00%) self.hir_attrs(self.local_def_id_to_hir_id(did)) 185,866 ( 0.01%) => ???:::hir_attrs (2,821x) . } else { . self.attrs_for_def(did) . } 22,864 ( 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(); 1,388 ( 0.00%) self.opt_associated_item(def_id)?.trait_item_def_id() 41,299 ( 0.00%) => ???:::opt_associated_item (347x) . } . . /// 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. 20,568 ( 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(); 3,798 ( 0.00%) self.impl_trait_header(def_id).trait_ref 14,452 ( 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(); 4,527 ( 0.00%) self.impl_trait_ref(def_id).skip_binder().def_id 131,937 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::impl_trait_ref:: (1,509x) . } . . /// 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 ---------------------------------------- -- line 2305 ---------------------------------------- . } . . /// Checks whether this is a `const fn`. Returns `false` for non-functions. . /// . /// Even if this returns `true`, constness may still be unstable! . #[inline] . pub fn is_const_fn(self, def_id: impl IntoQueryKey) -> bool { . let def_id = def_id.into_query_key(); 719 ( 0.00%) matches!( 360 ( 0.00%) self.def_kind(def_id), . DefKind::Fn | DefKind::AssocFn | DefKind::Ctor(_, CtorKind::Fn) | DefKind::Closure 180 ( 0.00%) ) && matches!(self.constness(def_id), hir::Constness::Const { .. }) . } . . /// Whether this item is conditionally constant for the purposes of the . /// effects implementation. . /// . /// This roughly corresponds to all const functions and other callable . /// items, along with const impls and traits, and associated types within . /// those impls and traits. -- line 2324 ---------------------------------------- 3,535 ( 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 18 ---------------------------------------- . use crate::{self as ty, DebruijnIndex, Interner, Region, UniverseIndex, Unnormalized}; . . /// `Binder` is a binder for higher-ranked lifetimes or types. It is part of the . /// compiler's representation for things like `for<'a> Fn(&'a isize)` . /// (which would be represented by the type `PolyTraitRef == Binder`). . /// . /// See . /// for more details. 117 ( 0.00%) #[derive_where(Clone, Copy, Hash, PartialEq, Debug; I: Interner, T)] . #[derive(GenericTypeVisitable, Lift_Generic)] . #[cfg_attr(feature = "nightly", derive(StableHash_NoContext))] . pub struct Binder { . value: T, . bound_vars: I::BoundVarKinds, . } . . impl Eq for Binder {} -- line 34 ---------------------------------------- -- line 37 ---------------------------------------- . where . T: TypeVisitable, . { . /// Wraps `value` in a binder, asserting that `value` does not . /// contain any bound vars that would be bound by the . /// binder. This is commonly used to 'inject' a value T into a . /// different binding level. . #[track_caller] 18 ( 0.00%) pub fn dummy(value: T) -> Binder { . assert!( 9 ( 0.00%) !value.has_escaping_bound_vars(), . "`{value:?}` has escaping bound vars, so it cannot be wrapped in a dummy binder." . ); . Binder { value, bound_vars: Default::default() } 36 ( 0.00%) } . . pub fn bind_with_vars(value: T, bound_vars: I::BoundVarKinds) -> Binder { . if cfg!(debug_assertions) { . let mut validator = ValidateBoundVars::new(bound_vars); . let _ = value.visit_with(&mut validator); . } 7,303 ( 0.00%) Binder { value, bound_vars } . } . } . . impl> TypeFoldable for Binder { . fn try_fold_with>(self, folder: &mut F) -> Result { . folder.try_fold_binder(self) . } . -- line 66 ---------------------------------------- -- line 79 ---------------------------------------- . fn try_super_fold_with>( . self, . folder: &mut F, . ) -> Result { . self.try_map_bound(|t| t.try_fold_with(folder)) . } . . fn super_fold_with>(self, folder: &mut F) -> Self { 236 ( 0.00%) self.map_bound(|t| t.fold_with(folder)) 2,655 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_type_ir/src/predicate.rs: as rustc_type_ir::fold::TypeFoldable>::fold_with::> (45x) . } . } . . impl> TypeSuperVisitable for Binder { . fn super_visit_with>(&self, visitor: &mut V) -> V::Result { . self.as_ref().skip_binder().visit_with(visitor) . } . } -- line 95 ---------------------------------------- -- line 104 ---------------------------------------- . /// . /// `skip_binder` is only valid when you are either extracting data that does not reference . /// any generic arguments, e.g. a `DefId`, or when you're making sure you only pass the . /// value to things which can handle escaping bound vars. . /// . /// See existing uses of `.skip_binder()` in `rustc_trait_selection::traits::select` . /// or `rustc_next_trait_solver` for examples. . pub fn skip_binder(self) -> T { 7,965 ( 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); . } 1,040 ( 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; 35 ( 0.00%) let value = f(value)?; . if cfg!(debug_assertions) { . let mut validator = ValidateBoundVars::new(bound_vars); . let _ = value.visit_with(&mut validator); . } . Ok(Binder { value, bound_vars }) . } . . /// Wraps a `value` in a binder, using the same bound variables as the -- line 163 ---------------------------------------- -- line 168 ---------------------------------------- . /// This currently doesn't do anything different than `bind`, because we . /// don't actually track bound vars. However, semantically, it is different . /// because bound vars aren't allowed to change here, whereas they are . /// in `bind`. This may be (debug) asserted in the future. . pub fn rebind(&self, value: U) -> Binder . where . U: TypeVisitable, . { 3,020 ( 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 { 3,027 ( 0.00%) self.value . } . } . . impl EarlyBinder> { . pub fn def_id(&self) -> I::TraitId { . self.value.def_id . } . } -- line 422 ---------------------------------------- -- line 629 ---------------------------------------- . } . . fn size_hint(&self) -> (usize, Option) { . self.t.size_hint() . } . } . . impl> ty::EarlyBinder { 32 ( 0.00%) pub fn instantiate(self, cx: I, args: A) -> Unnormalized . where . A: SliceLike, . { . // Nothing to fold, so let's avoid visiting things and possibly re-hashing/equating . // them when interning. Perf testing found this to be a modest improvement. . // See: 105 ( 0.00%) if args.is_empty() { . assert!( 61 ( 0.00%) !self.value.has_param(), . "{:?} has parameters, but no args were provided in instantiate", . self.value, . ); . return Unnormalized::new(self.value); . } 241 ( 0.00%) let mut folder = ArgFolder { cx, args: args.as_slice(), binders_passed: 0 }; 126 ( 0.00%) Unnormalized::new(self.value.fold_with(&mut folder)) 1,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/structural_impls.rs:>::fold_with::> (3x) 76 ( 0.00%) } . . /// Makes the identity replacement `T0 => T0, ..., TN => TN`. . /// Conceptually, this converts universally bound variables into placeholders . /// when inside of a given item. . /// . /// For example, consider `for fn foo(){ .. }`: . /// - Outside of `foo`, `T` is bound (represented by the presence of `EarlyBinder`). . /// - Inside of the body of `foo`, we treat `T` as a placeholder by calling -- line 662 ---------------------------------------- -- line 665 ---------------------------------------- . // FIXME(#155345): In case the bound value was already normalized, this . // is unnecessary. We may want to track explicitly whether `EarlyBinder` . // contains something that has been normalized already. . // Also do that for other types who have `instantiate_identity` method, . // e.g., `GenericClauses` and `ConstConditions`. . // . // This is annoying, as e.g. `type_of` for opaque types is normalized, . // while `type_of` for free type aliases is not. 413 ( 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 692 ---------------------------------------- . . impl<'a, I: Interner> TypeFolder for ArgFolder<'a, I> { . #[inline] . fn cx(&self) -> I { . self.cx . } . . fn fold_binder>(&mut self, t: ty::Binder) -> ty::Binder { 29 ( 0.00%) self.binders_passed += 1; . let t = t.super_fold_with(self); 28 ( 0.00%) self.binders_passed -= 1; . t . } . 138 ( 0.00%) fn fold_region(&mut self, r: Region) -> Region { . // Note: This routine only handles regions that are bound on . // type declarations and other outer declarations, not those . // bound in *fn types*. Region instantiation of the bound . // regions that appear in a function signature is done using . // the specialized routine `ty::replace_late_regions()`. 138 ( 0.00%) match r.kind() { . ty::ReEarlyParam(data) => { 35 ( 0.00%) let rk = self.args.get(data.index() as usize).map(|arg| arg.kind()); 42 ( 0.00%) => ???:::kind (7x) 14 ( 0.00%) match rk { 7 ( 0.00%) Some(ty::GenericArgKind::Lifetime(lt)) => self.shift_region_through_binders(lt), . Some(other) => self.region_param_expected(data, r, other), . None => self.region_param_out_of_range(data, r), . } . } . ty::ReBound(..) . | ty::ReLateParam(_) . | ty::ReStatic . | ty::RePlaceholder(_) . | ty::ReErased . | ty::ReError(_) => r, . ty::ReVar(_) => panic!("unexpected region: {r:?}"), . } 138 ( 0.00%) } . 280 ( 0.00%) fn fold_ty(&mut self, t: I::Ty) -> I::Ty { 103 ( 0.00%) if !t.has_param() { . return t; . } . 206 ( 0.00%) match t.kind() { . ty::Param(p) => self.ty_for_param(p, t), 290 ( 0.00%) _ => t.super_fold_with(self), 126 ( 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::> (1x) . } 385 ( 0.00%) } . . fn fold_const(&mut self, c: I::Const) -> I::Const { . if let ty::ConstKind::Param(p) = c.kind() { . self.const_for_param(p, c) . } else { . c.super_fold_with(self) . } . } -- line 748 ---------------------------------------- -- line 754 ---------------------------------------- . fn fold_clauses(&mut self, c: I::Clauses) -> I::Clauses { . if c.has_param() { c.super_fold_with(self) } else { c } . } . } . . impl<'a, I: Interner> ArgFolder<'a, I> { . fn ty_for_param(&self, p: I::ParamTy, source_ty: I::Ty) -> I::Ty { . // Look up the type in the args. It really should be in there. 220 ( 0.00%) let opt_ty = self.args.get(p.index() as usize).map(|arg| arg.kind()); 324 ( 0.00%) => ???:::kind (54x) 110 ( 0.00%) let ty = match opt_ty { . Some(ty::GenericArgKind::Type(ty)) => ty, . Some(kind) => self.type_param_expected(p, source_ty, kind), . None => self.type_param_out_of_range(p, source_ty), . }; . 52 ( 0.00%) self.shift_vars_through_binders(ty) . } . . #[cold] . #[inline(never)] . fn type_param_expected(&self, p: I::ParamTy, ty: I::Ty, kind: ty::GenericArgKind) -> ! { . panic!( . "expected type for `{:?}` ({:?}/{}) but found {:?} when instantiating, args={:?}", . p, -- line 777 ---------------------------------------- -- line 905 ---------------------------------------- . /// // DebruijnIndex of 1 | . /// // DebruijnIndex of 2 . /// ``` . /// As indicated in the diagram, here the same type `&'a i32` is instantiated once, but in the . /// first case we do not increase the De Bruijn index and in the second case we do. The reason . /// is that only in the second case have we passed through a fn binder. . #[instrument(level = "trace", skip(self), fields(binders_passed = self.binders_passed), ret)] . fn shift_vars_through_binders>(&self, val: T) -> T { 235 ( 0.00%) if self.binders_passed == 0 || !val.has_escaping_bound_vars() { . val . } else { . ty::shift_vars(self.cx, val, self.binders_passed) . } . } . . fn shift_region_through_binders(&self, region: Region) -> Region { 14 ( 0.00%) if self.binders_passed == 0 || !region.has_escaping_bound_vars() { . region . } else { . ty::shift_region(self.cx, region, self.binders_passed) . } . } . } . . /// Okay, we do something fun for `Bound` types/regions/consts: -- line 929 ---------------------------------------- -- line 976 ---------------------------------------- . if self.universe == ty::UniverseIndex::ROOT { . write!(f, "!{:?}", self.bound) . } else { . write!(f, "!{}_{:?}", self.universe.index(), self.bound) . } . } . } . 52,181 ( 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"), . } . } . } . 1,581 ( 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 ---------------------------------------- 1,864 ( 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 { 90,069 ( 0.00%) fn check_pat(&mut self, cx: &LateContext<'_>, pat: &Pat<'_>) { 25,734 ( 0.00%) if !pat.span.from_expansion() 26,237 ( 0.00%) && let PatKind::Struct(path, [], _) = &pat.kind . && let QPath::Resolved(_, path) = path 448 ( 0.00%) && let Res::Def(DefKind::Variant, did) = path.res . { 192 ( 0.00%) let enum_did = cx.tcx.parent(did); 192 ( 0.00%) let variant = cx.tcx.adt_def(enum_did).variant_with_id(did); 1,908 ( 0.00%) => ???:::variant_with_id (64x) . 64 ( 0.00%) let has_only_fields_brackets = variant.ctor.is_some() && variant.fields.is_empty(); . let non_exhaustive_activated = variant.field_list_has_applicable_non_exhaustive(); 11 ( 0.00%) if !has_only_fields_brackets || non_exhaustive_activated { . return; . } . . if is_from_proc_macro(cx, *path) { . return; . } . . if let Some(brackets_span) = pat.span.trim_start(path.span) { -- line 63 ---------------------------------------- -- line 67 ---------------------------------------- . brackets_span, . "struct pattern is not needed for a unit variant", . "remove the struct pattern", . String::new(), . Applicability::MachineApplicable, . ); . } . } 102,936 ( 0.00%) } . } 192 ( 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 126,350 ( 0.00%) if let ExprKind::Unary(UnOp::Not, inner) = expr.kind 748 ( 0.00%) && let ExprKind::Binary(ref op, left, _) = inner.kind 222 ( 0.00%) && let BinOpKind::Le | BinOpKind::Ge | BinOpKind::Lt | BinOpKind::Gt = op.node 90 ( 0.00%) && !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 { . return; -- line 58 ---------------------------------------- -- 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", . ); . } . } 497,168 ( 0.01%) } . } 326 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/mod.rs -------------------------------------------------------------------------------- Ir -- line 144 ---------------------------------------- . pub(crate) struct GenericShunt<'a, I, R> { . iter: I, . residual: &'a mut Option, . } . . /// Process the given iterator as if it yielded the item's `Try::Output` . /// type instead. Any `Try::Residual`s encountered will stop the inner iterator . /// and be propagated back to the overall result. 720 ( 0.00%) pub(crate) fn try_process(iter: I, mut f: F) -> ChangeOutputType . where . I: Iterator>, . for<'a> F: FnMut(GenericShunt<'a, I, R>) -> U, . R: Residual, . { . // FIXME(#11084): we might be able to get rid of GenericShunt in favor of . // Iterator::scan, as performance should be comparable . 4,577 ( 0.00%) let mut residual = None; . let shunt = GenericShunt { iter, residual: &mut residual }; . let value = f(shunt); 9,154 ( 0.00%) match residual { . Some(r) => FromResidual::from_residual(r), 13,230 ( 0.00%) None => Try::from_output(value), . } 840 ( 0.00%) } . . impl Iterator for GenericShunt<'_, I, R> . where . I: Iterator>, . { . type Item = ::Output; . 301,615 ( 0.01%) fn next(&mut self) -> Option { . self.try_for_each(ControlFlow::Break).break_value() 271,494 ( 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 126 ( 0.00%) .try_fold(init, |acc, x| match Try::branch(x) { . ControlFlow::Continue(x) => ControlFlow::from_try(f(acc, x)), . ControlFlow::Break(r) => { 254 ( 0.00%) *self.residual = Some(r); . ControlFlow::Break(try { acc }) 45 ( 0.00%) } . }) . .into_try() . } . . impl_fold_via_try_fold! { fold -> try_fold } . } . . #[unstable(issue = "none", feature = "inplace_iteration")] -- line 208 ---------------------------------------- 197 ( 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 { 683,606 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 124,292 ( 0.00%) let for_loop = higher::ForLoop::hir(expr); 960,350 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (62,146x) 62,146 ( 0.00%) if let Some(higher::ForLoop { 176 ( 0.00%) pat, 176 ( 0.00%) arg, 176 ( 0.00%) body, 176 ( 0.00%) loop_id, 176 ( 0.00%) span, 704 ( 0.00%) label, 124,292 ( 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 352 ( 0.00%) if body.span.from_expansion() { . return; . } 528 ( 0.00%) self.check_for_loop(cx, pat, arg, body, expr, span, label); 528 ( 0.00%) if let ExprKind::Block(block, _) = body.kind { 352 ( 0.00%) never_loop::check(cx, block, loop_id, span, for_loop.as_ref()); 848,343 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::check (176x) . } . } . . // we don't want to check expanded macros 124,292 ( 0.00%) if expr.span.from_expansion() { . return; . } . . // check for never_loop 129,416 ( 0.00%) if let ExprKind::Loop(block, ..) = expr.kind { 860 ( 0.00%) never_loop::check(cx, block, expr.hir_id, expr.span, None); 1,123,839 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::check (86x) . } . . // 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`) 334 ( 0.00%) if let ExprKind::Loop(block, label, LoopSource::Loop, _) = expr.kind { . // also check for empty `loop {}` statements, skipping those in #[panic_handler] 57 ( 0.00%) empty_loop::check(cx, expr, block); 95 ( 0.00%) while_let_loop::check(cx, expr, block); 1,249 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/while_let_loop.rs:clippy_lints::loops::while_let_loop::check (19x) 76 ( 0.00%) infinite_loop::check(cx, expr, block, label); 16,039 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/infinite_loop.rs:clippy_lints::loops::infinite_loop::check (19x) . } . 86,258 ( 0.00%) while_let_on_iterator::check(cx, expr); 1,501,091 ( 0.04%) => /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 (43,110x) . 46 ( 0.00%) if let Some(higher::While { . condition, body, span, .. 46 ( 0.00%) }) = higher::While::hir(expr) . { 184 ( 0.00%) while_immutable_condition::check(cx, condition, body); 1,336,308 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/while_immutable_condition.rs:clippy_lints::loops::while_immutable_condition::check (46x) 138 ( 0.00%) while_float::check(cx, condition); 2,488 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/while_float.rs:clippy_lints::loops::while_float::check (46x) . missing_spin_loop::check(cx, condition, body); 184 ( 0.00%) manual_while_let_some::check(cx, condition, body, span); 1,365 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/manual_while_let_some.rs:clippy_lints::loops::manual_while_let_some::check (46x) . } . 111,092 ( 0.00%) if let ExprKind::MethodCall(path, recv, args, _) = expr.kind { 6,261 ( 0.00%) let name = path.ident.name; . 240 ( 0.00%) let is_iterator_method = || { 160 ( 0.00%) cx.ty_based_def(expr) . .assoc_fn_parent(cx) . .is_diag_item(cx, sym::Iterator) 320 ( 0.00%) }; . . // is_iterator_method is a bit expensive, so we call it last in each match arm . match (name, args) { 40,815 ( 0.00%) (sym::for_each | sym::all | sym::any, [arg]) => { 15 ( 0.00%) if let ExprKind::Closure(closure) = arg.kind 30 ( 0.00%) && is_iterator_method() 1,460 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/mod.rs:::check_expr::{closure#0} (5x) . { 25 ( 0.00%) unused_enumerate_index::check_method(cx, recv, arg, closure); 825 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/unused_enumerate_index.rs:clippy_lints::loops::unused_enumerate_index::check_method (5x) 25 ( 0.00%) never_loop::check_iterator_reduction(cx, expr, recv, closure); 726 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/never_loop.rs:clippy_lints::loops::never_loop::check_iterator_reduction (5x) . } . }, . . (sym::filter_map | sym::find_map | sym::flat_map | sym::map, [arg]) => { 235 ( 0.00%) if let ExprKind::Closure(closure) = arg.kind 450 ( 0.00%) && is_iterator_method() 21,741 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/mod.rs:::check_expr::{closure#0} (75x) . { 88 ( 0.00%) unused_enumerate_index::check_method(cx, recv, arg, closure); 4,113 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/loops/unused_enumerate_index.rs:clippy_lints::loops::unused_enumerate_index::check_method (22x) . } . }, . 1,836 ( 0.00%) (sym::try_for_each | sym::reduce, [arg]) | (sym::fold | sym::try_fold, [_, arg]) => { 73 ( 0.00%) if let ExprKind::Closure(closure) = arg.kind . && is_iterator_method() . { . never_loop::check_iterator_reduction(cx, expr, recv, closure); . } . }, . . _ => {}, . } . } 497,168 ( 0.01%) } . } . . impl Loops { . #[expect(clippy::too_many_arguments)] . fn check_for_loop<'tcx>( . &self, . cx: &LateContext<'tcx>, . pat: &'tcx Pat<'_>, . arg: &'tcx Expr<'_>, . body: &'tcx Expr<'_>, . expr: &'tcx Expr<'_>, . span: Span, . label: Option

(&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| { 1,305 ( 0.00%) if predicate(&x) { ControlFlow::Break(x) } else { ControlFlow::Continue(()) } 291 ( 0.00%) } . } . . self.try_fold((), check(predicate)).break_value() . } . . /// Applies function to the elements of iterator and returns . /// the first non-none result. . /// -- line 2972 ---------------------------------------- -- line 2986 ---------------------------------------- . #[rustc_non_const_trait_method] . fn find_map(&mut self, f: F) -> Option . where . Self: Sized, . F: FnMut(Self::Item) -> Option, . { . #[inline] . fn check(mut f: impl FnMut(T) -> Option) -> impl FnMut((), T) -> ControlFlow { 91,580 ( 0.00%) move |(), x| match f(x) { 69 ( 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::unit_types::let_unit_value::check::{closure#2}::{closure#0} as core::ops::function::FnMut<(clippy_lints::unit_types::let_unit_value::VariableUsage,)>>::call_mut (1x) 64 ( 0.00%) Some(x) => ControlFlow::Break(x), . None => ControlFlow::Continue(()), . } . } . 34,613 ( 0.00%) self.try_fold((), check(f)).break_value() 8,523,599 ( 0.23%) => /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> (33,849x) . } . . /// Applies function to the elements of iterator and returns . /// the first true result or the first error. . /// . /// The return type of this method depends on the return type of the closure. . /// If you return `Result` from the closure, you'll get a `Result, E>`. . /// If you return `Option` from the closure, you'll get an `Option>`. -- line 3008 ---------------------------------------- -- line 3134 ---------------------------------------- . { . #[inline] . fn check<'a, T>( . mut predicate: impl FnMut(T) -> bool + 'a, . acc: &'a mut usize, . ) -> impl FnMut((), T) -> ControlFlow + 'a { . #[rustc_inherit_overflow_checks] . move |_, x| { 4 ( 0.00%) if predicate(x) { . ControlFlow::Break(*acc) . } else { . *acc += 1; . ControlFlow::Continue(()) . } . } . } . -- line 3150 ---------------------------------------- -- line 3468 ---------------------------------------- . /// . /// let (x, (y, z)): (Vec<_>, (Vec<_>, Vec<_>)) = a.into_iter().unzip(); . /// assert_eq!(x, [1, 4]); . /// assert_eq!(y, [2, 5]); . /// assert_eq!(z, [3, 6]); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_non_const_trait_method] 3,608 ( 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); 4,510 ( 0.00%) unzipped 4,059 ( 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, . { 519 ( 0.00%) self.eq_by(other, |x, y| x == y) 12,591 ( 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::tokenize_with_text::{closure#0}>, clippy_utils::hir_utils::eq_span_tokens::f<::eq_block::{closure#2}>::{closure#0}>, clippy_utils::hir_utils::eq_span_tokens::f<::eq_block::{closure#2}>::{closure#1}> as core::iter::traits::iterator::Iterator>::eq_by::, clippy_utils::tokenize_with_text::{closure#0}>, clippy_utils::hir_utils::eq_span_tokens::f<::eq_block::{closure#2}>::{closure#0}>, clippy_utils::hir_utils::eq_span_tokens::f<::eq_block::{closure#2}>::{closure#1}>, , clippy_utils::tokenize_with_text::{closure#0}>, clippy_utils::hir_utils::eq_span_tokens::f<::eq_block::{closure#2}>::{closure#0}>, clippy_utils::hir_utils::eq_span_tokens::f<::eq_block::{closure#2}>::{closure#1}> as core::iter::traits::iterator::Iterator>::eq, clippy_utils::tokenize_with_text::{closure#0}>, clippy_utils::hir_utils::eq_span_tokens::f<::eq_block::{closure#2}>::{closure#0}>, clippy_utils::hir_utils::eq_span_tokens::f<::eq_block::{closure#2}>::{closure#1}>>::{closure#0}> (10x) . } . . /// 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] 394 ( 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(()) } . } . } . 705 ( 0.00%) SpecIterEq::spec_iter_eq(self, other.into_iter(), compare(eq)) 514 ( 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 3927 ---------------------------------------- . #[stable(feature = "iter_order", since = "1.5.0")] . #[rustc_non_const_trait_method] . fn ne(self, other: I) -> bool . where . I: IntoIterator, . Self::Item: PartialEq, . Self: Sized, . { 4 ( 0.00%) !self.eq(other) . } . . /// Determines if the elements of this [`Iterator`] are [lexicographically](Ord#lexicographical-comparison) . /// less than those of another. . /// . /// # Examples . /// . /// ``` -- line 3943 ---------------------------------------- -- line 4160 ---------------------------------------- . #[inline] . fn spec_iter_eq(self, b: B, f: F) -> bool . where . F: FnMut(Self::Item, ::Item) -> ControlFlow<()>, . { . // we *can't* short-circuit if: . match (self.size_hint(), b.size_hint()) { . // ... both iterators have the same length 10 ( 0.00%) ((_, Some(a)), (_, Some(b))) if a == b => {} . // ... or both of them are longer than `usize::MAX` (i.e. have an unknown length). . ((_, None), (_, None)) => {} . // otherwise, we can ascertain that they are unequal without actually comparing items . _ => return false, . } . . iter_eq(self, b, f) . } -- line 4176 ---------------------------------------- -- line 4202 ---------------------------------------- . B: Iterator, . { . move |x| match b.next() { . None => ControlFlow::Break(ControlFlow::Continue(Ordering::Greater)), . Some(y) => f(x, y).map_break(ControlFlow::Break), . } . } . 150 ( 0.00%) match a.try_for_each(compare(&mut b, f)) { . ControlFlow::Continue(()) => ControlFlow::Continue(match b.next() { . None => Ordering::Equal, . Some(_) => Ordering::Less, . }), . ControlFlow::Break(x) => x, . } . } . -- line 4218 ---------------------------------------- -- line 4229 ---------------------------------------- . /// Implements `Iterator` for mutable references to iterators, such as those produced by [`Iterator::by_ref`]. . /// . /// This implementation passes all method calls on to the original iterator. . #[stable(feature = "rust1", since = "1.0.0")] . impl Iterator for &mut I { . type Item = I::Item; . #[inline] . fn next(&mut self) -> Option { 1,414 ( 0.00%) (**self).next() 4,137 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:, core::slice::iter::Iter> as core::iter::traits::iterator::Iterator>::next (367x) 1,952 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/iter/macros.rs: as core::iter::traits::iterator::Iterator>::next (340x) . } . fn size_hint(&self) -> (usize, Option) { . (**self).size_hint() . } . fn advance_by(&mut self, n: usize) -> Result<(), NonZero> { . (**self).advance_by(n) . } . fn nth(&mut self, n: usize) -> Option { -- line 4245 ---------------------------------------- 2,075,514 ( 0.06%) -------------------------------------------------------------------------------- -- 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 102 ---------------------------------------- . /// Expression must be a `Vec<_>`. Type cannot change. . Impossible, . } . . impl UselessVec { . /// Checks if the surrounding environment requires this expression to actually be of type . /// `Vec<_>`, or if it can be changed to `&[]`/`[]` without causing type errors. . fn expr_usage_requires_vec(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) -> VecToArray { 799 ( 0.00%) match cx.tcx.parent_hir_node(expr.hir_id) { 9,100 ( 0.00%) => ???:::parent_hir_node (84x) . // search for `let foo = vec![_]` expressions where all uses of `foo` . // adjust to slices or call a method that exist on slices (e.g. len) . Node::LetStmt(LetStmt { . ty: None, . pat: . Pat { . kind: PatKind::Binding(_, id, ..), . .. . }, . .. . }) => { 441 ( 0.00%) let only_slice_uses = for_each_local_use_after_expr(cx, *id, expr.hir_id, |expr| { 199,228 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_local_use_after_expr::<(), ::expr_usage_requires_vec::{closure#0}> (27x) . // allow indexing into a vec and some set of allowed method calls that exist on slices, too 120 ( 0.00%) if let Some(parent) = get_parent_expr(cx, expr) 4,284 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (36x) 26 ( 0.00%) && (adjusts_to_slice(cx, expr) 143 ( 0.00%) || match parent.kind { . ExprKind::Index(..) => true, 34 ( 0.00%) ExprKind::MethodCall(path, _, [], _) => { . // If the given expression is a method call to a `Vec` method that also exists on . // slices, it means that this expression does not actually require a `Vec` and could . // just work with an array. . VEC_METHODS_SHADOWING_SLICE_METHODS.contains(&path.ident.name) . }, . _ => false, . }) . { . ControlFlow::Continue(()) . } else { . ControlFlow::Break(()) . } 252 ( 0.00%) }) . .is_continue(); . . if only_slice_uses { . VecToArray::Possible . } else { . VecToArray::Impossible . } . }, . // if the local pattern has a specified type, do not lint. 4 ( 0.00%) Node::LetStmt(LetStmt { ty: Some(_), .. }) if higher::VecArgs::hir(cx, expr).is_some() => { 315 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (1x) . VecToArray::Impossible . }, . // search for `for _ in vec![...]` . Node::Expr(expr) 114 ( 0.00%) if expr.span.is_desugaring(DesugaringKind::ForLoop) 1,827 ( 0.00%) => ???:::is_desugaring (19x) . && self.msrv.meets(cx, msrvs::ARRAY_INTO_ITERATOR) => . { . VecToArray::Possible . }, . // search for `&vec![_]` or `vec![_]` expressions where the adjusted type is `&[_]` . _ => { . if adjusts_to_slice(cx, expr) { . VecToArray::Possible -- line 164 ---------------------------------------- -- line 166 ---------------------------------------- . VecToArray::Impossible . } . }, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for UselessVec { 559,314 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 248,752 ( 0.01%) if let Some(vec_args) = higher::VecArgs::hir(cx, expr.peel_borrows()) 1,949,193 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (62,146x) . // The `vec![]` or `&vec![]` invocation span. 336 ( 0.00%) && let vec_span = expr.span.parent_callsite().unwrap_or(expr.span) 8,568 ( 0.00%) => ???:::parent_callsite (84x) . && !vec_span.from_expansion() . { 252 ( 0.00%) if self.allow_in_test && is_in_test(cx.tcx, expr.hir_id) { . return; . } . 162 ( 0.00%) match self.expr_usage_requires_vec(cx, expr) { . VecToArray::Possible => { . let suggest_ty = suggest_type(expr); . . // Size and `Copy` checks don't depend on the enclosing usage of the expression . // and don't need to be inserted into the state map. 6 ( 0.00%) let vec_snippet = match vec_args { . higher::VecArgs::Repeat(expr, len) => { 21 ( 0.00%) if is_copy(cx, cx.typeck_results().expr_ty(expr)) 478 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_copy (3x) 120 ( 0.00%) => ???:::expr_ty (3x) 30 ( 0.00%) && let Some(Constant::Int(length)) = ConstEvalCtxt::new(cx).eval(len) 168 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (3x) 135 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (3x) . && let Ok(length) = u64::try_from(length) . && size_of(cx, expr) . .checked_mul(length) . .is_some_and(|size| size <= self.too_large_for_stack) . { . suggest_ty.snippet( . cx, . Some(expr.span.source_callsite()), -- line 201 ---------------------------------------- -- line 228 ---------------------------------------- . entry.insert(VecState::Change { . suggest_ty, . vec_snippet, . expr_hir_id: expr.hir_id, . }); . } . }, . VecToArray::Impossible => { 972 ( 0.00%) self.span_to_state.insert(vec_span, VecState::NoChange); 117,275 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/collections/btree/map.rs:>::insert (81x) . }, . } . } 497,168 ( 0.01%) } . 8 ( 0.00%) fn check_crate_post(&mut self, cx: &LateContext<'tcx>) { 739 ( 0.00%) for (span, state) in mem::take(&mut self.span_to_state) { 81 ( 0.00%) if let VecState::Change { . suggest_ty, . vec_snippet, . expr_hir_id, 81 ( 0.00%) } = 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()); . // If the `vec!` macro contains comment, better not make the suggestion machine applicable as it . // would remove them. . let applicability = if span_contains_comment(cx, span) { . 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 ---------------------------------------- -- line 301 ---------------------------------------- . } . . fn size_of(cx: &LateContext<'_>, expr: &Expr<'_>) -> u64 { . let ty = cx.typeck_results().expr_ty_adjusted(expr); . cx.layout_of(ty).map_or(0, |l| l.size.bytes()) . } . . fn adjusts_to_slice(cx: &LateContext<'_>, e: &Expr<'_>) -> bool { 390 ( 0.00%) matches!(cx.typeck_results().expr_ty_adjusted(e).kind(), ty::Ref(_, ty, _) if ty.is_slice()) 2,071 ( 0.00%) => ???:::expr_ty_adjusted (35x) . } . . fn suggest_type(expr: &Expr<'_>) -> SuggestedType { 12 ( 0.00%) if let ExprKind::AddrOf(BorrowKind::Ref, mutability, _) = expr.kind { . // `expr` is `&vec![_]`, so suggest `&[_]` (or `&mut[_]` resp.) . SuggestedType::SliceRef(mutability) . } else { . // `expr` is the `vec![_]` expansion, so suggest `[_]` . SuggestedType::Array . } . } 676 ( 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 = 7,910 ( 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 { 18,380 ( 0.00%) match self.ptr.addr().get() & TAG_MASK { . REGION_TAG => GenericArgKind::Lifetime(ty::Region(Interned::new_unchecked( . ptr.cast::>().as_ref(), . ))), . TYPE_TAG => GenericArgKind::Type(Ty(Interned::new_unchecked( . ptr.cast::>>().as_ref(), . ))), . CONST_TAG => GenericArgKind::Const(ty::Const(Interned::new_unchecked( . ptr.cast::>>().as_ref(), -- line 239 ---------------------------------------- -- line 336 ---------------------------------------- . ) -> Result { . match self.kind() { . GenericArgKind::Lifetime(lt) => lt.try_fold_with(folder).map(Into::into), . GenericArgKind::Type(ty) => ty.try_fold_with(folder).map(Into::into), . GenericArgKind::Const(ct) => ct.try_fold_with(folder).map(Into::into), . } . } . 120 ( 0.00%) fn fold_with>>(self, folder: &mut F) -> Self { . match self.kind() { 807 ( 0.00%) GenericArgKind::Lifetime(lt) => lt.fold_with(folder).into(), 380 ( 0.00%) GenericArgKind::Type(ty) => ty.fold_with(folder).into(), . GenericArgKind::Const(ct) => ct.fold_with(folder).into(), . } 92 ( 0.00%) } . } . . impl<'tcx> TypeVisitable> for GenericArg<'tcx> { . fn visit_with>>(&self, visitor: &mut V) -> V::Result { 2,619 ( 0.00%) match self.kind() { . GenericArgKind::Lifetime(lt) => lt.visit_with(visitor), 55 ( 0.00%) GenericArgKind::Type(ty) => ty.visit_with(visitor), . GenericArgKind::Const(ct) => ct.visit_with(visitor), . } . } . } . . impl<'tcx, E: TyEncoder<'tcx>> Encodable for GenericArg<'tcx> { . fn encode(&self, e: &mut E) { . self.kind().encode(e) -- line 365 ---------------------------------------- -- line 427 ---------------------------------------- . Self::for_item(tcx, def_id.into(), |param, _| tcx.mk_param_from_def(param)) . } . . /// 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. 65 ( 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); 20 ( 0.00%) Self::fill_item(&mut args, tcx, defs, &mut mk_kind); 1,160 ( 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:: (5x) 10 ( 0.00%) tcx.mk_args(&args) 420 ( 0.00%) => ???:::mk_args (5x) 35 ( 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)) . }) . } . 100 ( 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>, . { 45 ( 0.00%) if let Some(def_id) = defs.parent { . let parent_defs = tcx.generics_of(def_id); 25 ( 0.00%) Self::fill_item(args, tcx, parent_defs, mk_kind); 380 ( 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::'2 (5x) . } 20 ( 0.00%) Self::fill_single(args, defs, mk_kind) 80 ( 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); 20 ( 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> { 1,683 ( 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)), . } . } . 10,098 ( 0.00%) fn fold_with>>(self, folder: &mut F) -> Self { . // See justification for this behavior in `try_fold_with`. 5,458 ( 0.00%) match self.len() { . 1 => { 979 ( 0.00%) let param0 = self[0].fold_with(folder); 19,185 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:>::fold_with::> (32x) 7,278 ( 0.00%) if param0 == self[0] { self } else { folder.cx().mk_args(&[param0]) } . } . 2 => { 142 ( 0.00%) let param0 = self[0].fold_with(folder); 1,960 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:>::fold_with::> (4x) 410 ( 0.00%) let param1 = self[1].fold_with(folder); 84 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:>::fold_with::> (4x) 585 ( 0.00%) if param0 == self[0] && param1 == self[1] { . self . } else { 659 ( 0.00%) folder.cx().mk_args(&[param0, param1]) . } . } . 0 => self, 144 ( 0.00%) _ => ty::util::fold_list(self, folder, |tcx, v| tcx.mk_args(v)), 944 ( 0.00%) => ???:::mk_args (8x) . } 10,095 ( 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)), . } . } . 20,847 ( 0.00%) fn fold_with>>(self, folder: &mut F) -> Self { . // See comment justifying behavior in `try_fold_with`. 4,638 ( 0.00%) match self.len() { . 2 => { 1,265 ( 0.00%) let param0 = self[0].fold_with(folder); 3,795 ( 0.00%) let param1 = self[1].fold_with(folder); 3,795 ( 0.00%) if param0 == self[0] && param1 == self[1] { . self . } else { 8,855 ( 0.00%) folder.cx().mk_type_list(&[param0, param1]) 130,646 ( 0.00%) => ???:::mk_type_list (1,261x) . } . } 1,060 ( 0.00%) _ => ty::util::fold_list(self, folder, |tcx, v| tcx.mk_type_list(v)), 120,444 ( 0.00%) => ???:::mk_type_list (1,053x) . } 20,841 ( 0.00%) } . } . . impl<'tcx, T: TypeVisitable>> TypeVisitable> for &'tcx ty::List { . #[inline] . fn visit_with>>(&self, visitor: &mut V) -> V::Result { 11,693 ( 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 ---------------------------------------- 7,757 ( 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); 472 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/single_component_path_imports.rs:::check_mod (1x) . } . 16,236 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 7,216 ( 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", . ); . } . } 14,432 ( 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 { 15 ( 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, . ) { 71 ( 0.00%) if item.span.from_expansion() || item.vis.kind.is_pub() { . return; . } . 36 ( 0.00%) match &item.kind { . ItemKind::Mod(_, _, ModKind::Loaded(items, ..)) => { 2 ( 0.00%) self.check_mod(items); 234 ( 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 . if segments.len() == 1 { . if let UseTreeKind::Simple(None) = use_tree.kind { . let name = segments[0].ident.name; -- line 196 ---------------------------------------- -------------------------------------------------------------------------------- -- 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. 894 ( 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`. 1,044,354 ( 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. 230,863 ( 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 ---------------------------------------- 273,889 ( 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_data_structures/src/sync/lock.rs -------------------------------------------------------------------------------- Ir -- line 48 ---------------------------------------- . } . } . . impl<'a, T: 'a> Drop for LockGuard<'a, T> { . #[inline] . fn drop(&mut self) { . // SAFETY (union access): We get `self.mode` from the lock operation so it is consistent . // with the `lock.mode` state. This means we access the right union fields. 235,210 ( 0.01%) match self.mode { . Mode::NoSync => { . let cell = unsafe { &self.lock.mode_union.no_sync }; . debug_assert!(cell.get()); . cell.set(false); 882 ( 0.00%) } . // SAFETY (unlock): We know that the lock is locked as this type is a proof of that. . Mode::Sync => unsafe { self.lock.mode_union.sync.unlock() }, . } . } . } . . union ModeUnion { . /// Indicates if the cell is locked. Only used if `Lock.mode` is `NoSync`. -- line 69 ---------------------------------------- -- line 143 ---------------------------------------- . #[cold] . fn lock_held() -> ! { . panic!("lock was already held") . } . . // SAFETY: This is safe since the union fields are used in accordance with `mode` . // which also must match `self.mode` due to the safety precondition. . unsafe { 401,298 ( 0.01%) match mode { . Mode::NoSync => { 427,326 ( 0.01%) if self.mode_union.no_sync.replace(LOCKED) == LOCKED { . hint::cold_path(); . lock_held() . } . } . Mode::Sync => self.mode_union.sync.lock(), . } . } . LockGuard { lock: self, marker: PhantomData, mode } . } . . #[inline(always)] . #[track_caller] . pub fn lock(&self) -> LockGuard<'_, T> { 200,649 ( 0.01%) unsafe { self.lock_assume(self.mode) } . } . } . . unsafe impl DynSend for Lock {} . unsafe impl DynSync for Lock {} . . impl Lock { . #[inline(always)] -- line 175 ---------------------------------------- 205,534 ( 0.01%) -------------------------------------------------------------------------------- -- 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 { 372,876 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'tcx>) { 136,723 ( 0.00%) if let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, addrof_target) = e.kind 4,508 ( 0.00%) && let ExprKind::Unary(UnOp::Deref, deref_target) = addrof_target.kind 190 ( 0.00%) && !matches!(deref_target.kind, ExprKind::Unary(UnOp::Deref, ..)) 170 ( 0.00%) && !e.span.from_expansion() 14 ( 0.00%) && !deref_target.span.from_expansion() 14 ( 0.00%) && !addrof_target.span.from_expansion() 21 ( 0.00%) && let ref_ty = cx.typeck_results().expr_ty(deref_target) 280 ( 0.00%) => ???:::expr_ty (7x) 14 ( 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, . ); . }, . ); . } 435,022 ( 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)) . } 2,668 ( 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) { 98,896 ( 0.00%) if let ExprKind::Struct(ref se) = expr.kind 2,212 ( 0.00%) && self.msrv.meets(msrvs::FIELD_INIT_SHORTHAND) 13,272 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (553x) . { 553 ( 0.00%) for field in &se.fields { 2,870 ( 0.00%) if !field.is_shorthand 3,472 ( 0.00%) && let ExprKind::Path(None, path) = &field.expr.kind 226 ( 0.00%) && let [segment] = path.segments.as_slice() 100 ( 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, . ); . } . } . } 49,448 ( 0.00%) } . . extract_msrv_attr!(); . } 8,848 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs -------------------------------------------------------------------------------- Ir -- line 5094 ---------------------------------------- . allowed_dotfiles: FxHashSet<&'static str>, . format_args: FormatArgsStorage, . allow_unwrap_types: Vec, . unwrap_allowed_ids: FxHashSet, . unwrap_allowed_aliases: Vec, . } . . impl Methods { 10 ( 0.00%) pub fn new(conf: &'static Conf, format_args: FormatArgsStorage) -> Self { . let mut allowed_dotfiles: FxHashSet<_> = conf.allowed_dotfiles.iter().map(|s| &**s).collect(); . allowed_dotfiles.extend(DEFAULT_ALLOWED_DOTFILES); . 21 ( 0.00%) Self { 1 ( 0.00%) avoid_breaking_exported_api: conf.avoid_breaking_exported_api, 1 ( 0.00%) msrv: conf.msrv.into(), . allow_expect_in_tests: conf.allow_expect_in_tests, . allow_unwrap_in_tests: conf.allow_unwrap_in_tests, 1 ( 0.00%) allow_expect_in_consts: conf.allow_expect_in_consts, 1 ( 0.00%) allow_unwrap_in_consts: conf.allow_unwrap_in_consts, 6 ( 0.00%) allowed_dotfiles, 1 ( 0.00%) format_args, 3 ( 0.00%) allow_unwrap_types: conf.allow_unwrap_types.clone(), 33 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs: as core::clone::Clone>::clone (1x) . unwrap_allowed_ids: FxHashSet::default(), . unwrap_allowed_aliases: Vec::new(), . } 9 ( 0.00%) } . } . . /// Extracts a method call name, args, and `Span` of the method name. . /// This ensures that neither the receiver nor any of the arguments . /// come from expansion. 8,032 ( 0.00%) pub fn method_call<'tcx>(recv: &'tcx Expr<'tcx>) -> Option<(Symbol, &'tcx Expr<'tcx>, &'tcx [Expr<'tcx>], Span, Span)> { 48,376 ( 0.00%) if let ExprKind::MethodCall(path, receiver, args, call_span) = recv.kind 18,825 ( 0.00%) && !args.iter().any(|e| e.range_span().unwrap_or(e.span).from_expansion()) 81,797 ( 0.00%) => ???:::range_span (3,467x) 26,924 ( 0.00%) && !receiver.range_span().unwrap_or(receiver.span).from_expansion() 140,591 ( 0.00%) => ???:::range_span (6,284x) . { 18,580 ( 0.00%) Some((path.ident.name, receiver, args, path.ident.span, call_span)) . } else { 575 ( 0.00%) None . } 8,032 ( 0.00%) } . . 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%) } . 497,168 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 124,292 ( 0.00%) if expr.span.from_expansion() { . return; . } . 278,220 ( 0.01%) match expr.kind { 11,028 ( 0.00%) ExprKind::Call(func, args) => { 13,785 ( 0.00%) unnecessary_fallible_conversions::check_function(cx, expr, func); 2,869,957 ( 0.08%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_fallible_conversions.rs:clippy_lints::methods::unnecessary_fallible_conversions::check_function (2,757x) 30,327 ( 0.00%) manual_c_str_literals::check(cx, expr, func, args, self.msrv); 116,053 ( 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 (2,757x) 22,056 ( 0.00%) useless_nonzero_new_unchecked::check(cx, expr, func, args, self.msrv); 77,591 ( 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 (2,757x) 22,056 ( 0.00%) io_other_error::check(cx, expr, func, args, self.msrv); 44,697 ( 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 (2,757x) 27,570 ( 0.00%) swap_with_temporary::check(cx, expr, func, args); 217,585 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/swap_with_temporary.rs:clippy_lints::methods::swap_with_temporary::check (2,757x) 16,542 ( 0.00%) ip_constant::check(cx, expr, func, args); 87,403 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/ip_constant.rs:clippy_lints::methods::ip_constant::check (2,757x) 8,271 ( 0.00%) clone_on_copy::check_function(cx, expr); 726,221 ( 0.02%) => /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 (2,757x) 30,327 ( 0.00%) unwrap_expect_used::check_call( 263,231 ( 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 (2,757x) . cx, . expr, . func, . args, 2,757 ( 0.00%) self.allow_unwrap_in_tests, 2,757 ( 0.00%) self.allow_expect_in_tests, 2,757 ( 0.00%) self.allow_unwrap_in_consts, 2,757 ( 0.00%) self.allow_expect_in_consts, 2,757 ( 0.00%) &self.unwrap_allowed_ids, . &self.unwrap_allowed_aliases, . ); . }, . ExprKind::MethodCall(..) => { 56,349 ( 0.00%) self.check_methods(cx, expr); 57,541,541 ( 1.58%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:::check_methods (6,261x) . }, 7,441 ( 0.00%) ExprKind::Binary(op, lhs, rhs) if op.node == hir::BinOpKind::Eq || op.node == hir::BinOpKind::Ne => { 1,068 ( 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); . }, 144 ( 0.00%) ExprKind::Binary(op, lhs, rhs) if op.node == hir::BinOpKind::Or => { 864 ( 0.00%) manual_is_variant_and::check_or(cx, expr, lhs, rhs, self.msrv); 1,570 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/manual_is_variant_and.rs:clippy_lints::methods::manual_is_variant_and::check_or (72x) . }, . _ => (), . } 446,504 ( 0.01%) } . 25,030 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, impl_item: &'tcx hir::ImplItem<'_>) { 7,509 ( 0.00%) if impl_item.span.in_external_macro(cx.sess().source_map()) { . return; . } . 9,737 ( 0.00%) if let hir::ImplItemKind::Fn(ref sig, id) = impl_item.kind { 9,535 ( 0.00%) let parent = cx.tcx.hir_get_parent_item(impl_item.hir_id()).def_id; 256,935 ( 0.01%) => ???:::hir_get_parent_item (1,907x) 7,628 ( 0.00%) let item = cx.tcx.hir_expect_item(parent); 117,979 ( 0.00%) => ???:::hir_expect_item (1,907x) 5,721 ( 0.00%) let self_ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip(); 7,628 ( 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(); 3,814 ( 0.00%) let method_sig = cx.tcx.instantiate_bound_regions_with_erased(method_sig); 2,294,584 ( 0.06%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased::> (1,907x) 1,907 ( 0.00%) let first_arg_ty_opt = method_sig.inputs().iter().next().copied(); 15,256 ( 0.00%) should_implement_trait::check_impl_item(cx, impl_item, self_ty, implements_trait, first_arg_ty_opt, sig); 138,359 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/should_implement_trait.rs:clippy_lints::methods::should_implement_trait::check_impl_item (1,907x) . 7,628 ( 0.00%) if sig.decl.implicit_self().has_implicit_self() 15,256 ( 0.00%) => ???:::implicit_self (1,907x) 3,100 ( 0.00%) && !(self.avoid_breaking_exported_api 7,750 ( 0.00%) && cx.effective_visibilities.is_exported(impl_item.owner_id.def_id)) 82,860 ( 0.00%) => ???:::is_exported (1,550x) 3,108 ( 0.00%) && let Some(first_arg) = iter_input_pats(sig.decl, cx.tcx.hir_body(id)).next() 50,409 ( 0.00%) => ???:::hir_body (777x) 1,554 ( 0.00%) && let Some(first_arg_ty) = first_arg_ty_opt . { 4,662 ( 0.00%) wrong_self_convention::check( 1,925,261 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/wrong_self_convention.rs:clippy_lints::methods::wrong_self_convention::check (777x) . cx, 777 ( 0.00%) impl_item.ident.name, . self_ty, . first_arg_ty, 1,554 ( 0.00%) first_arg.pat.span, . implements_trait, . false, . ); . } . . new_ret_no_self::check_impl_item(cx, impl_item, self_ty, implements_trait); . } 20,024 ( 0.00%) } . 490 ( 0.00%) fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) { 140 ( 0.00%) if let TraitItemKind::Fn(ref sig, _) = item.kind 350 ( 0.00%) && !item.span.in_external_macro(cx.tcx.sess.source_map()) . { 280 ( 0.00%) if sig.decl.implicit_self().has_implicit_self() 560 ( 0.00%) => ???:::implicit_self (70x) . && let Some(first_arg_hir_ty) = sig.decl.inputs.first() 66 ( 0.00%) && let Some(&first_arg_ty) = cx . .tcx 132 ( 0.00%) .fn_sig(item.owner_id) . .instantiate_identity() . .skip_norm_wip() . .inputs() . .skip_binder() . .first() . { . let self_ty = TraitRef::identity(cx.tcx, item.owner_id.to_def_id()).self_ty(); 396 ( 0.00%) wrong_self_convention::check( 2,128,133 ( 0.06%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/wrong_self_convention.rs:clippy_lints::methods::wrong_self_convention::check (66x) . cx, 132 ( 0.00%) item.ident.name, . self_ty, . first_arg_ty, 66 ( 0.00%) first_arg_hir_ty.span, . false, . true, . ); . } . 210 ( 0.00%) new_ret_no_self::check_trait_item(cx, item); 1,190 ( 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 (70x) . } 560 ( 0.00%) } . } . . impl Methods { . #[expect(clippy::too_many_lines)] 43,827 ( 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) { 41,422 ( 0.00%) (sym::add | sym::sub | sym::wrapping_add | sym::wrapping_sub, [_arg]) => { 112 ( 0.00%) zst_offset::check(cx, expr, recv); 5,364 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/zst_offset.rs:clippy_lints::methods::zst_offset::check (56x) . }, . (sym::all, [arg]) => { 36 ( 0.00%) needless_character_iteration::check(cx, expr, recv, arg, true); 454 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/needless_character_iteration.rs:clippy_lints::methods::needless_character_iteration::check (4x) 32 ( 0.00%) match method_call(recv) { 287 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (4x) . Some((sym::cloned, recv2, [], _, _)) => { . iter_overeager_cloned::check( . cx, . expr, . recv, . recv2, . iter_overeager_cloned::Op::NeedlessMove(arg), . false, -- line 5284 ---------------------------------------- -- line 5289 ---------------------------------------- . }, . _ => {}, . } . }, . (name @ (sym::chunks_exact | sym::chunks_exact_mut), [arg]) => { . chunks_exact_to_as_chunks::check(cx, recv, arg, expr, call_span, name, self.msrv); . }, . (sym::and_then, [arg]) => { 120 ( 0.00%) manual_option_zip::check(cx, expr, recv, arg, self.msrv); 2,729 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/manual_option_zip.rs:clippy_lints::methods::manual_option_zip::check (12x) . let biom_option_linted = bind_instead_of_map::check_and_then_some(cx, expr, recv, arg); . let biom_result_linted = bind_instead_of_map::check_and_then_ok(cx, expr, recv, arg); 48 ( 0.00%) if !biom_option_linted && !biom_result_linted { 96 ( 0.00%) let ule_and_linted = unnecessary_lazy_eval::check(cx, expr, recv, arg, "and", true); 15,104 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_lazy_eval.rs:clippy_lints::methods::unnecessary_lazy_eval::check (12x) 24 ( 0.00%) if !ule_and_linted { 60 ( 0.00%) return_and_then::check(cx, expr, recv, arg); 114,818 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/return_and_then.rs:clippy_lints::methods::return_and_then::check (12x) . } . } . 72 ( 0.00%) manual_filter::check_and_then_method(cx, recv, arg, call_span, expr); 3,211 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/manual_filter.rs:clippy_lints::matches::manual_filter::check_and_then_method (12x) . }, . (sym::any, [arg]) => { 9 ( 0.00%) needless_character_iteration::check(cx, expr, recv, arg, false); 112 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/needless_character_iteration.rs:clippy_lints::methods::needless_character_iteration::check (1x) 7 ( 0.00%) match method_call(recv) { 89 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (1x) . Some((sym::cloned, recv2, [], _, _)) => iter_overeager_cloned::check( . cx, . expr, . recv, . recv2, . iter_overeager_cloned::Op::NeedlessMove(arg), . false, . ), -- line 5319 ---------------------------------------- -- line 5322 ---------------------------------------- . && let body = cx.tcx.hir_body(arg.body) . && let [param] = body.params => . { . string_lit_chars_any::check(cx, expr, recv, param, peel_blocks(body.value), self.msrv); . }, . Some((sym::map, _, [map_arg], _, map_call_span)) => { . map_all_any_identity::check(cx, expr, recv, map_call_span, map_arg, call_span, arg, "any"); . }, 1 ( 0.00%) Some((sym::iter, iter_recv, ..)) => { 5 ( 0.00%) manual_contains::check(cx, expr, iter_recv, arg); 113 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/manual_contains.rs:clippy_lints::methods::manual_contains::check (1x) 1 ( 0.00%) }, . _ => {}, . } . }, . (sym::arg, [arg]) => { . suspicious_command_arg_space::check(cx, recv, arg, span); . }, 39,705 ( 0.00%) (sym::as_deref | sym::as_deref_mut, []) => { 6 ( 0.00%) needless_option_as_deref::check(cx, expr, recv, name); 672 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/needless_option_as_deref.rs:clippy_lints::methods::needless_option_as_deref::check (3x) . }, . (sym::as_bytes, []) => { 105 ( 0.00%) if let Some((sym::as_str, recv, [], as_str_span, _)) = method_call(recv) { 300 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (15x) . redundant_as_str::check(cx, expr, recv, as_str_span, span); . } 45 ( 0.00%) sliced_string_as_bytes::check(cx, expr, recv); 255 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/sliced_string_as_bytes.rs:clippy_lints::methods::sliced_string_as_bytes::check (15x) . }, 396 ( 0.00%) (sym::as_mut | sym::as_ref, []) => useless_asref::check(cx, expr, name, recv), 123,899 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/useless_asref.rs:clippy_lints::methods::useless_asref::check (132x) 120 ( 0.00%) (sym::as_ptr, []) => manual_c_str_literals::check_as_ptr(cx, expr, recv, self.msrv), 408 ( 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 (24x) . (sym::assume_init, []) => uninit_assumed_init::check(cx, expr, recv), . (sym::bytes, []) => unbuffered_bytes::check(cx, expr, recv), . (sym::cloned, []) => { 54 ( 0.00%) cloned_instead_of_copied::check(cx, expr, recv, span, self.msrv); 154,809 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/cloned_instead_of_copied.rs:clippy_lints::methods::cloned_instead_of_copied::check (6x) 38 ( 0.00%) if let Some((method @ (sym::as_ref | sym::as_mut), as_ref_recv, [], as_ref_ident_span, _)) = 24 ( 0.00%) method_call(recv) 578 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (6x) . { . option_as_ref_cloned::check(cx, span, method, as_ref_recv, as_ref_ident_span); . } . }, 182 ( 0.00%) (sym::collect, []) if cx.ty_based_def(expr).opt_parent(cx).is_diag_item(cx, sym::Iterator) => { 1,508 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/res.rs: as clippy_utils::res::MaybeDef>::opt_parent:: (13x) 117 ( 0.00%) needless_collect::check(cx, span, expr, recv, call_span); 258,289 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/needless_collect.rs:clippy_lints::methods::needless_collect::check (13x) 65 ( 0.00%) match method_call(recv) { 2,073 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (13x) 54 ( 0.00%) Some((name @ (sym::cloned | sym::copied), recv2, [], _, _)) => { 3 ( 0.00%) iter_cloned_collect::check(cx, name, expr, recv2); 412 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/iter_cloned_collect.rs:clippy_lints::methods::iter_cloned_collect::check (1x) . }, 58 ( 0.00%) Some((sym::map, m_recv, [m_arg], m_ident_span, _)) => { 36 ( 0.00%) map_collect_result_unit::check(cx, expr, m_recv, m_arg); 1,386 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/map_collect_result_unit.rs:clippy_lints::methods::map_collect_result_unit::check (9x) 45 ( 0.00%) format_collect::check(cx, expr, m_arg, m_ident_span); 1,044 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/format_collect.rs:clippy_lints::methods::format_collect::check (9x) . }, . Some((sym::take, take_self_arg, [take_arg], _, _)) => { . if self.msrv.meets(cx, msrvs::STR_REPEAT) { . manual_str_repeat::check(cx, expr, recv, take_self_arg, take_arg); . } . }, 6 ( 0.00%) Some((sym::drain, recv, args, ..)) => match args { . [arg] => drain_collect::check(cx, Some(arg), expr, recv), . [] => drain_collect::check(cx, None, expr, recv), . _ => {}, . }, . _ => {}, . } . }, 84 ( 0.00%) (sym::count, []) if cx.ty_based_def(expr).opt_parent(cx).is_diag_item(cx, sym::Iterator) => { 696 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/res.rs: as clippy_utils::res::MaybeDef>::opt_parent:: (6x) 30 ( 0.00%) match method_call(recv) { 572 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (6x) 28 ( 0.00%) Some((sym::cloned, recv2, [], _, _)) => { . iter_overeager_cloned::check( . cx, . expr, . recv, . recv2, . iter_overeager_cloned::Op::RmCloned, . false, . ); . }, 4 ( 0.00%) Some((name2 @ (sym::into_iter | sym::iter | sym::iter_mut), recv2, [], _, _)) => { . iter_count::check(cx, expr, recv2, name2); 3 ( 0.00%) }, 16 ( 0.00%) Some((sym::map, _, [arg], _, _)) => suspicious_map::check(cx, expr, recv, arg), 5 ( 0.00%) Some((sym::filter, recv2, [arg], _, _)) => bytecount::check(cx, expr, recv2, arg), 129 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/bytecount.rs:clippy_lints::methods::bytecount::check (1x) . Some((sym::bytes, recv2, [], _, _)) => bytes_count_to_len::check(cx, expr, recv, recv2), . _ => {}, . } . }, . (sym::min | sym::max, [arg]) => { . unnecessary_min_or_max::check(cx, expr, name, recv, arg); . }, 5,778 ( 0.00%) (sym::drain, ..) => { 9 ( 0.00%) if let Node::Stmt(Stmt { hir_id: _, kind, .. }) = cx.tcx.parent_hir_node(expr.hir_id) 108 ( 0.00%) => ???:::parent_hir_node (1x) . && matches!(kind, StmtKind::Semi(_)) . && args.len() <= 1 . { . clear_with_drain::check(cx, expr, recv, span, args.first()); 1 ( 0.00%) } else if let [arg] = args { 3 ( 0.00%) iter_with_drain::check(cx, expr, recv, span, arg); 18 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/iter_with_drain.rs:clippy_lints::methods::iter_with_drain::check (1x) . } . }, . (sym::ends_with, [arg]) => { . if let ExprKind::MethodCall(.., span) = expr.kind { . case_sensitive_file_extension_comparisons::check(cx, expr, span, recv, arg, self.msrv); . } . path_ends_with_ext::check(cx, recv, arg, expr, self.msrv, &self.allowed_dotfiles); . }, . (sym::expect, [_]) => { . match method_call(recv) { 112 ( 0.00%) Some((sym::ok, recv_inner, [], _, _)) => ok_expect::check(cx, expr, recv, recv_inner), . Some((sym::err, recv, [], err_span, _)) => { . err_expect::check(cx, expr, recv, span, err_span, self.msrv); . }, . _ => {}, . } 245 ( 0.00%) unnecessary_literal_unwrap::check(cx, expr, recv, name, args); . }, . (sym::unwrap_unchecked, []) => { 14 ( 0.00%) unnecessary_unwrap_unchecked::check(cx, expr, recv, call_span); 3,120 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_unwrap_unchecked.rs:clippy_lints::methods::unnecessary_unwrap_unchecked::check (2x) 14 ( 0.00%) unnecessary_literal_unwrap::check(cx, expr, recv, name, args); 178 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_literal_unwrap.rs:clippy_lints::methods::unnecessary_literal_unwrap::check (2x) . }, . (sym::expect_err, [_]) | (sym::unwrap_err | sym::unwrap_err_unchecked, []) => { . unnecessary_literal_unwrap::check(cx, expr, recv, name, args); . }, . (sym::extend, [arg]) => { 112 ( 0.00%) string_extend_chars::check(cx, expr, recv, arg); 1,710 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/string_extend_chars.rs:clippy_lints::methods::string_extend_chars::check (14x) 70 ( 0.00%) extend_with_drain::check(cx, expr, recv, arg); 292,886 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/extend_with_drain.rs:clippy_lints::methods::extend_with_drain::check (14x) . }, . (sym::filter, [arg]) => { 18 ( 0.00%) if let Some((sym::cloned, recv2, [], _span2, _)) = method_call(recv) { 178 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (2x) . // if `arg` has side-effect, the semantic will change . iter_overeager_cloned::check( . cx, . expr, . recv, . recv2, . iter_overeager_cloned::Op::FixClosure(name, arg), . false, . ); . } 14 ( 0.00%) if self.msrv.meets(cx, msrvs::ITER_FLATTEN) { 54 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (2x) . // use the sourcemap to get the span of the closure 10 ( 0.00%) iter_filter::check(cx, expr, arg, span); 38,382 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/iter_filter.rs:clippy_lints::methods::iter_filter::check (2x) . } 12 ( 0.00%) some_filter::check(cx, expr, recv, arg, self.msrv); 56 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/some_filter.rs:clippy_lints::methods::some_filter::check (2x) . }, . (sym::find, [arg]) => { 22 ( 0.00%) if let Some((sym::cloned, recv2, [], _span2, _)) = method_call(recv) { 193 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (4x) . // if `arg` has side-effect, the semantic will change . iter_overeager_cloned::check( . cx, . expr, . recv, . recv2, . iter_overeager_cloned::Op::FixClosure(name, arg), . false, . ); . } . }, . (sym::filter_map, [arg]) => { 9 ( 0.00%) unnecessary_filter_map::check(cx, expr, arg, call_span, unnecessary_filter_map::Kind::FilterMap); 3,212 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_filter_map.rs:clippy_lints::methods::unnecessary_filter_map::check (1x) 5 ( 0.00%) filter_map_bool_then::check(cx, expr, arg, call_span); 18,987 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/filter_map_bool_then.rs:clippy_lints::methods::filter_map_bool_then::check (1x) 6 ( 0.00%) filter_map_identity::check(cx, expr, arg, span); 763 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/filter_map_identity.rs:clippy_lints::methods::filter_map_identity::check (1x) 11 ( 0.00%) lines_filter_map_ok::check_filter_or_flat_map( 444 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/lines_filter_map_ok.rs:clippy_lints::methods::lines_filter_map_ok::check_filter_or_flat_map (1x) . cx, . expr, . recv, . "filter_map", . arg, . call_span, 1 ( 0.00%) self.msrv, . ); 7 ( 0.00%) if let Some((map_name @ (sym::iter | sym::into_iter), recv2, _, _, _)) = method_call(recv) { 356 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (1x) . iter_kv_map::check(cx, map_name, expr, recv2, arg, self.msrv, sym::filter_map); . } . }, . (sym::find_map, [arg]) => { . unnecessary_filter_map::check(cx, expr, arg, call_span, unnecessary_filter_map::Kind::FindMap); . }, . (sym::flat_map, [arg]) => { . flat_map_identity::check(cx, expr, arg, span); -- line 5496 ---------------------------------------- -- line 5498 ---------------------------------------- . lines_filter_map_ok::check_filter_or_flat_map( . cx, expr, recv, "flat_map", arg, call_span, self.msrv, . ); . if let Some((map_name @ (sym::iter | sym::into_iter), recv2, _, _, _)) = method_call(recv) { . iter_kv_map::check(cx, map_name, expr, recv2, arg, self.msrv, sym::flat_map); . } . }, . (sym::flatten, []) => { 20 ( 0.00%) match method_call(recv) { 178 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (2x) . Some((sym::map, recv, [map_arg], map_span, _)) => { . map_flatten::check(cx, expr, recv, map_arg, map_span); . }, . Some((sym::cloned, recv2, [], _, _)) => iter_overeager_cloned::check( . cx, . expr, . recv, . recv2, . iter_overeager_cloned::Op::LaterCloned, . true, . ), . _ => {}, . } 8 ( 0.00%) lines_filter_map_ok::check_flatten(cx, expr, recv, call_span, self.msrv); 908 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/lines_filter_map_ok.rs:clippy_lints::methods::lines_filter_map_ok::check_flatten (2x) . }, . (sym::fold, [init, acc]) => { . manual_try_fold::check(cx, expr, init, acc, call_span, self.msrv); . unnecessary_fold::check(cx, expr, init, acc, span); . }, . (sym::for_each, [arg]) => match method_call(recv) { . Some((sym::inspect, _, [_], span2, _)) => inspect_for_each::check(cx, expr, span2), . Some((sym::cloned, recv2, [], _, _)) => iter_overeager_cloned::check( -- line 5528 ---------------------------------------- -- line 5531 ---------------------------------------- . recv, . recv2, . iter_overeager_cloned::Op::NeedlessMove(arg), . false, . ), . _ => {}, . }, . (sym::get, [arg]) => { 616 ( 0.00%) get_first::check(cx, expr, recv, arg); 746,693 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/get_first.rs:clippy_lints::methods::get_first::check (77x) 385 ( 0.00%) get_last_with_len::check(cx, expr, recv, arg); 1,309 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/get_last_with_len.rs:clippy_lints::methods::get_last_with_len::check (77x) . }, . (sym::get_or_insert_with, [arg]) => { . unnecessary_lazy_eval::check(cx, expr, recv, arg, "get_or_insert", false); . }, . (sym::hash, [arg]) => { 2 ( 0.00%) unit_hash::check(cx, expr, recv, arg); 376 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unit_hash.rs:clippy_lints::methods::unit_hash::check (2x) . }, . (sym::is_empty, []) => { 566 ( 0.00%) match method_call(recv) { 2,737 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (76x) 96 ( 0.00%) Some((prev_method @ (sym::as_bytes | sym::bytes), prev_recv, [], _, _)) => { . needless_as_bytes::check(cx, prev_method, name, prev_recv, expr.span); . }, . Some((sym::as_str, recv, [], as_str_span, _)) => { . redundant_as_str::check(cx, expr, recv, as_str_span, span); . }, . _ => {}, . } 304 ( 0.00%) is_empty::check(cx, expr, recv); 87,317 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/is_empty.rs:clippy_lints::methods::is_empty::check (76x) . }, . (sym::is_file, []) => filetype_is_file::check(cx, expr, recv), . (sym::is_digit, [radix]) => is_digit_ascii_radix::check(cx, expr, recv, radix, self.msrv), 91 ( 0.00%) (sym::is_none, []) => check_is_some_is_none(cx, expr, recv, call_span, false, self.msrv), 365 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::check_is_some_is_none (13x) 405 ( 0.00%) (sym::is_some, []) => check_is_some_is_none(cx, expr, recv, call_span, true, self.msrv), 10,399 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::check_is_some_is_none (49x) . (sym::is_some_and, [arg]) => manual_is_variant_and::check_ok_is_some_and(cx, expr, recv, arg), . (sym::iter | sym::iter_mut | sym::into_iter, []) => { 612 ( 0.00%) iter_on_single_or_empty_collections::check(cx, expr, name, recv); 12,975 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/iter_on_single_or_empty_collections.rs:clippy_lints::methods::iter_on_single_or_empty_collections::check (120x) . }, . (sym::join, [join_arg]) => { 15 ( 0.00%) if let Some((sym::collect, _, _, span, _)) = method_call(recv) { 267 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (3x) 9 ( 0.00%) unnecessary_join::check(cx, expr, recv, join_arg, span); 429 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_join.rs:clippy_lints::methods::unnecessary_join::check (3x) . } else { . join_absolute_paths::check(cx, recv, join_arg, expr.span); . } . }, . (sym::last, []) => { 14 ( 0.00%) if let Some((sym::cloned, recv2, [], _span2, _)) = method_call(recv) { 40 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (2x) . iter_overeager_cloned::check( . cx, . expr, . recv, . recv2, . iter_overeager_cloned::Op::LaterCloned, . false, . ); . } 6 ( 0.00%) double_ended_iterator_last::check(cx, expr, recv, call_span); 767 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/double_ended_iterator_last.rs:clippy_lints::methods::double_ended_iterator_last::check (2x) . }, . (sym::len, []) => { 1,650 ( 0.00%) if let Some((prev_method @ (sym::as_bytes | sym::bytes), prev_recv, [], _, _)) = method_call(recv) { 11,028 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (303x) 12 ( 0.00%) needless_as_bytes::check(cx, prev_method, sym::len, prev_recv, expr.span); 447 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/needless_as_bytes.rs:clippy_lints::methods::needless_as_bytes::check (3x) . } . }, . (sym::lock, []) => { . mut_mutex_lock::check(cx, expr, recv, span); . }, . (name @ (sym::map | sym::map_err), [m_arg]) => { . if name == sym::map { 632 ( 0.00%) map_clone::check(cx, expr, recv, m_arg, self.msrv); 827,810 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/map_clone.rs:clippy_lints::methods::map_clone::check (79x) 632 ( 0.00%) map_with_unused_argument_over_ranges::check(cx, expr, recv, m_arg, self.msrv, span); 12,634 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/map_with_unused_argument_over_ranges.rs:clippy_lints::methods::map_with_unused_argument_over_ranges::check (79x) 395 ( 0.00%) manual_is_variant_and::check_map(cx, expr, self.msrv); 11,182 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/manual_is_variant_and.rs:clippy_lints::methods::manual_is_variant_and::check_map (79x) 677 ( 0.00%) match method_call(recv) { 5,980 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (79x) 16 ( 0.00%) Some((map_name @ (sym::iter | sym::into_iter), recv2, _, _, _)) => { 96 ( 0.00%) iter_kv_map::check(cx, map_name, expr, recv2, m_arg, self.msrv, sym::map); 270,713 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/iter_kv_map.rs:clippy_lints::methods::iter_kv_map::check (16x) . }, 8 ( 0.00%) Some((sym::cloned, recv2, [], _, _)) => iter_overeager_cloned::check( 466 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/iter_overeager_cloned.rs:clippy_lints::methods::iter_overeager_cloned::check (1x) . cx, . expr, . recv, . recv2, 3 ( 0.00%) iter_overeager_cloned::Op::NeedlessMove(m_arg), . false, . ), . _ => {}, . } . } else { 325 ( 0.00%) map_err_ignore::check(cx, expr, m_arg); 102,235 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/map_err_ignore.rs:clippy_lints::methods::map_err_ignore::check (65x) . } 910 ( 0.00%) if let Some((name, recv2, args, span2, _)) = method_call(recv) { 13,638 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (144x) . match (name, args) { 560 ( 0.00%) (sym::as_mut, []) => option_as_ref_deref::check(cx, expr, recv2, m_arg, true, self.msrv), 32 ( 0.00%) (sym::as_ref, []) => option_as_ref_deref::check(cx, expr, recv2, m_arg, false, self.msrv), 1,124 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/option_as_ref_deref.rs:clippy_lints::methods::option_as_ref_deref::check (4x) 2 ( 0.00%) (sym::filter, [f_arg]) => { 4 ( 0.00%) filter_map::check(cx, expr, recv2, f_arg, span2, recv, m_arg, span, false); . }, 8 ( 0.00%) (sym::find, [f_arg]) => { 15 ( 0.00%) filter_map::check(cx, expr, recv2, f_arg, span2, recv, m_arg, span, true); . }, . _ => {}, . } . } 1,152 ( 0.00%) map_identity::check(cx, expr, recv, m_arg, name, span); 99,022 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/map_identity.rs:clippy_lints::methods::map_identity::check (144x) 1,008 ( 0.00%) manual_inspect::check(cx, expr, m_arg, name, span, self.msrv); 122,804 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/manual_inspect.rs:clippy_lints::methods::manual_inspect::check (144x) . }, 132 ( 0.00%) (sym::map_or, [def, map]) => { 352 ( 0.00%) option_map_or_none::check(cx, expr, recv, def, map); 583,994 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/option_map_or_none.rs:clippy_lints::methods::option_map_or_none::check (44x) 308 ( 0.00%) manual_ok_or::check(cx, expr, recv, def, map); 27,739 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/manual_ok_or.rs:clippy_lints::methods::manual_ok_or::check (44x) 396 ( 0.00%) unnecessary_map_or::check(cx, expr, recv, def, map, span, self.msrv); 419,773 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_map_or.rs:clippy_lints::methods::unnecessary_map_or::check (44x) . }, . (sym::map_or_else, [def, map]) => { . result_map_or_else_none::check(cx, expr, recv, def, map); . unnecessary_map_or_else::check(cx, expr, recv, def, map, call_span); 44 ( 0.00%) }, . (sym::next, []) => { 184 ( 0.00%) if let Some((name2, recv2, args2, _, _)) = method_call(recv) { 1,038 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (45x) . match (name2, args2) { 16 ( 0.00%) (sym::cloned, []) => iter_overeager_cloned::check( . cx, . expr, . recv, . recv2, . iter_overeager_cloned::Op::LaterCloned, . false, . ), . (sym::filter, [arg]) => { . filter_next::check(cx, expr, recv2, arg, filter_next::Direction::Forward); . }, . (sym::filter_map, [arg]) => filter_map_next::check(cx, expr, recv2, arg, self.msrv), 14 ( 0.00%) (sym::iter | sym::iter_mut, []) => iter_next_slice::check(cx, expr, recv2, name2), . (sym::skip, [arg]) => iter_skip_next::check(cx, expr, recv2, arg), . (sym::skip_while, [_]) => skip_while_next::check(cx, expr), . (sym::rev, []) => manual_next_back::check(cx, expr, recv, recv2), . _ => {}, . } . } . }, . (sym::next_back, []) => { 16 ( 0.00%) if let Some((name2, recv2, args2, _, _)) = method_call(recv) 80 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (4x) . && let (sym::filter, [arg]) = (name2, args2) . && self.msrv.meets(cx, msrvs::DOUBLE_ENDED_ITERATOR_RFIND) . { . filter_next::check(cx, expr, recv2, arg, filter_next::Direction::Backward); . } . }, . (sym::nth, [n_arg]) => match method_call(recv) { . Some((sym::bytes, recv2, [], _, _)) => bytes_nth::check(cx, expr, recv2, n_arg), -- line 5675 ---------------------------------------- -- line 5696 ---------------------------------------- . }, . (sym::ok_or_else, [arg]) => { . unnecessary_lazy_eval::check(cx, expr, recv, arg, "ok_or", true); . }, . (sym::open, [_]) => { . open_options::check(cx, expr, recv); . }, . (sym::or_else, [arg]) => { 12 ( 0.00%) if !bind_instead_of_map::check_or_else_err(cx, expr, recv, arg) { 24 ( 0.00%) unnecessary_lazy_eval::check(cx, expr, recv, arg, "or", false); . } . }, . (sym::peek, []) => { . by_ref_peekable_peek::check(cx, expr, recv); . }, . (sym::push, [arg]) => { 200 ( 0.00%) path_buf_push_overwrite::check(cx, expr, arg); 62,739 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/path_buf_push_overwrite.rs:clippy_lints::methods::path_buf_push_overwrite::check (100x) . }, . (sym::read_to_end, [_]) => { . verbose_file_reads::check(cx, expr, recv, verbose_file_reads::READ_TO_END_MSG); . }, . (sym::read_to_string, [_]) => { . verbose_file_reads::check(cx, expr, recv, verbose_file_reads::READ_TO_STRING_MSG); . }, . (sym::read_line, [arg]) => { -- line 5720 ---------------------------------------- -- line 5729 ---------------------------------------- . // Check for repeated `str::replace` calls to perform `collapsible_str_replace` lint . if self.msrv.meets(cx, msrvs::PATTERN_TRAIT_CHAR_ARRAY) . && name == sym::replace . && let Some((sym::replace, ..)) = method_call(recv) . { . collapsible_str_replace::check(cx, expr, arg1, arg2); . } . }, 18 ( 0.00%) (sym::resize, [count_arg, default_arg]) => { 12 ( 0.00%) vec_resize_to_zero::check(cx, expr, count_arg, default_arg, span); 5,034 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/vec_resize_to_zero.rs:clippy_lints::methods::vec_resize_to_zero::check (6x) . }, . (sym::seek, [arg]) => { . if self.msrv.meets(cx, msrvs::SEEK_FROM_CURRENT) { . seek_from_current::check(cx, expr, recv, arg); . } . if self.msrv.meets(cx, msrvs::SEEK_REWIND) { . seek_to_start_instead_of_rewind::check(cx, expr, recv, arg, span); . } -- line 5746 ---------------------------------------- -- line 5756 ---------------------------------------- . recv, . recv2, . iter_overeager_cloned::Op::LaterCloned, . false, . ); . } . }, . (sym::sort, []) => { 6 ( 0.00%) stable_sort_primitive::check(cx, expr, recv); 5,347 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/stable_sort_primitive.rs:clippy_lints::methods::stable_sort_primitive::check (3x) . }, . (sym::sort_by, [arg]) => { . unnecessary_sort_by::check(cx, expr, call_span, arg, false); . }, . (sym::sort_unstable_by, [arg]) => { . unnecessary_sort_by::check(cx, expr, call_span, arg, true); . }, . (sym::split, [arg]) => { 1 ( 0.00%) str_split::check(cx, expr, recv, call_span, arg); 16 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/str_split.rs:clippy_lints::methods::str_split::check (1x) 27 ( 0.00%) }, 3,716 ( 0.00%) (sym::splitn | sym::rsplitn, [count_arg, pat_arg]) => { . if let Some(Constant::Int(count)) = ConstEvalCtxt::new(cx).eval(count_arg) { . suspicious_splitn::check(cx, name, expr, recv, count); . 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); . } . }, 22,544 ( 0.00%) (sym::step_by, [arg]) => iterator_step_by_zero::check(cx, expr, arg), 16 ( 0.00%) (sym::take, [arg]) => { . iter_out_of_bounds::check_take(cx, expr, recv, arg); 48 ( 0.00%) manual_repeat_n::check(cx, expr, recv, arg, self.msrv); 9,110 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/manual_repeat_n.rs:clippy_lints::methods::manual_repeat_n::check (8x) . if let Some((sym::cloned, recv2, [], _span2, _)) = method_call(recv) { . iter_overeager_cloned::check( . cx, . expr, . recv, . recv2, . iter_overeager_cloned::Op::LaterCloned, . false, . ); . } . }, 32 ( 0.00%) (sym::take, []) => needless_option_take::check(cx, expr, recv), 216 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/needless_option_take.rs:clippy_lints::methods::needless_option_take::check (8x) . (sym::then, [arg]) => { . if !self.msrv.meets(cx, msrvs::BOOL_THEN_SOME) { . return; . } . unnecessary_lazy_eval::check(cx, expr, recv, arg, "then_some", true); 6 ( 0.00%) }, 240 ( 0.00%) (sym::try_into, []) if cx.ty_based_def(expr).opt_parent(cx).is_diag_item(cx, sym::TryInto) => { 1,740 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/res.rs: as clippy_utils::res::MaybeDef>::opt_parent:: (15x) 30 ( 0.00%) unnecessary_fallible_conversions::check_method(cx, expr); 355,997 ( 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_method (15x) . }, 12 ( 0.00%) (sym::to_owned, []) => { 24 ( 0.00%) if !suspicious_to_owned::check(cx, expr, span) { 1,062 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/suspicious_to_owned.rs:clippy_lints::methods::suspicious_to_owned::check (6x) 30 ( 0.00%) implicit_clone::check(cx, name, expr, recv); . } . }, 26,462 ( 0.00%) (sym::to_os_string | sym::to_path_buf | sym::to_string | sym::to_vec, []) => { 11 ( 0.00%) implicit_clone::check(cx, name, expr, recv); . }, . (sym::type_id, []) => { . type_id_on_box::check(cx, recv, expr.span); . }, . (sym::unwrap, []) => { 2,520 ( 0.00%) match method_call(recv) { 19,447 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (210x) . Some((sym::get, recv, [get_arg], _, _)) => { . get_unwrap::check(cx, expr, recv, get_arg, false); . }, . Some((sym::get_mut, recv, [get_arg], _, _)) => { . get_unwrap::check(cx, expr, recv, get_arg, true); . }, . Some((sym::or, recv, [or_arg], or_span, _)) => { . or_then_unwrap::check(cx, expr, recv, or_arg, or_span); . }, . _ => {}, . } 1,470 ( 0.00%) unnecessary_literal_unwrap::check(cx, expr, recv, name, args); 23,636 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_literal_unwrap.rs:clippy_lints::methods::unnecessary_literal_unwrap::check (210x) . }, 7,923 ( 0.00%) (sym::unwrap_or, [u_arg]) => { 380 ( 0.00%) match method_call(recv) { 2,889 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:clippy_lints::methods::method_call (76x) 90 ( 0.00%) 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); . }, 12 ( 0.00%) Some((sym::map, m_recv, [m_arg], span, _)) => { 48 ( 0.00%) map_unwrap_or::check(cx, expr, m_recv, m_arg, recv, u_arg, span, self.msrv); 35,078 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/map_unwrap_or.rs:clippy_lints::methods::map_unwrap_or::check (6x) . }, . Some((then_method @ (sym::then | sym::then_some), t_recv, [t_arg], _, _)) => { . obfuscated_if_else::check( . cx, . expr, . t_recv, . t_arg, . then_method, . obfuscated_if_else::Unwrap::Or(u_arg), . ); . }, . _ => {}, . } 456 ( 0.00%) unnecessary_literal_unwrap::check(cx, expr, recv, name, args); . }, . (sym::unwrap_or_default, []) => { . match method_call(recv) { . Some((sym::checked_sub, lhs, [rhs], _, _)) => { . manual_saturating_arithmetic::check_sub_unwrap_or_default(cx, expr, lhs, rhs); . }, . Some((sym::map, m_recv, [arg], span, _)) => { . manual_is_variant_and::check_map_unwrap_or_default(cx, expr, m_recv, arg, span, self.msrv); -- line 5865 ---------------------------------------- -- line 5871 ---------------------------------------- . t_recv, . t_arg, . then_method, . obfuscated_if_else::Unwrap::OrDefault, . ); . }, . _ => {}, . } 481 ( 0.00%) unnecessary_literal_unwrap::check(cx, expr, recv, name, args); . }, . (sym::unwrap_or_else, [u_arg]) => { . match method_call(recv) { . Some((sym::map, recv, [map_arg], _, _)) . if map_unwrap_or_else::check(cx, expr, recv, map_arg, u_arg, self.msrv) => {}, . Some((then_method @ (sym::then | sym::then_some), t_recv, [t_arg], _, _)) => { . obfuscated_if_else::check( . cx, -- line 5887 ---------------------------------------- -- 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,156 ( 0.00%) (sym::zip, [arg]) => { 141 ( 0.00%) if let ExprKind::MethodCall(name, iter_recv, [], _) = recv.kind 2 ( 0.00%) && name.ident.name == sym::iter . { 1 ( 0.00%) range_zip_with_len::check(cx, expr, iter_recv, arg); 358 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/range_zip_with_len.rs:clippy_lints::methods::range_zip_with_len::check (1x) . } . }, . _ => {}, . } . } . // Handle method calls whose receiver and arguments may come from expansion . if let ExprKind::MethodCall(path, recv, args, call_span) = expr.kind { 6,261 ( 0.00%) let method_span = path.ident.span; . . // Those methods do their own method name checking as they deal with multiple methods. 93,915 ( 0.00%) or_fun_call::check(cx, expr, method_span, path.ident.name, recv, args, self.msrv); 1,564,597 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/or_fun_call.rs:clippy_lints::methods::or_fun_call::check (6,261x) 56,349 ( 0.00%) unnecessary_to_owned::check(cx, expr, path.ident.name, recv, args, self.msrv); 2,709,458 ( 0.07%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_to_owned.rs:clippy_lints::methods::unnecessary_to_owned::check (6,261x) . 6,261 ( 0.00%) match (path.ident.name, args) { 61,618 ( 0.00%) (sym::clone, []) => { 684 ( 0.00%) clone_on_ref_ptr::check(cx, expr, recv); 16,911 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/clone_on_ref_ptr.rs:clippy_lints::methods::clone_on_ref_ptr::check (114x) 570 ( 0.00%) clone_on_copy::check(cx, expr, recv); 45,402,021 ( 1.25%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/clone_on_copy.rs:clippy_lints::methods::clone_on_copy::check (114x) . }, 98 ( 0.00%) (sym::expect, [arg]) => { 539 ( 0.00%) unwrap_expect_used::check( 157,824 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unwrap_expect_used.rs:clippy_lints::methods::unwrap_expect_used::check (49x) . cx, . expr, . recv, . false, 49 ( 0.00%) self.allow_expect_in_consts, 49 ( 0.00%) self.allow_expect_in_tests, 49 ( 0.00%) &self.unwrap_allowed_ids, . &self.unwrap_allowed_aliases, . unwrap_expect_used::Variant::Expect, . ); 392 ( 0.00%) expect_fun_call::check(cx, &self.format_args, expr, method_span, recv, arg); 3,773 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/expect_fun_call.rs:clippy_lints::methods::expect_fun_call::check (49x) . }, . (sym::expect_err, [_]) => { . unwrap_expect_used::check( . cx, . expr, . recv, . true, . self.allow_expect_in_consts, . self.allow_expect_in_tests, . &self.unwrap_allowed_ids, . &self.unwrap_allowed_aliases, . unwrap_expect_used::Variant::Expect, . ); . }, . (sym::insert_str | sym::push_str, _) => { 5 ( 0.00%) single_char_add_str::check(cx, expr, recv, args); 503,033 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/single_char_add_str.rs:clippy_lints::methods::single_char_add_str::check (5x) . }, 8 ( 0.00%) (sym::into_iter, []) => { 4 ( 0.00%) into_iter_on_ref::check(cx, expr, method_span, recv); 380 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/into_iter_on_ref.rs:clippy_lints::methods::into_iter_on_ref::check (4x) . }, 132 ( 0.00%) (sym::map_or, [def, map]) => { 44 ( 0.00%) map_or_identity::check(cx, expr, recv, call_span, def, map); 18,098 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/map_or_identity.rs:clippy_lints::methods::map_or_identity::check (44x) 93 ( 0.00%) }, . 4 ( 0.00%) (sym::to_string, []) => { . inefficient_to_string::check(cx, expr, recv, self.msrv); . }, 12 ( 0.00%) (sym::truncate, [arg]) => { 6 ( 0.00%) manual_clear::check(cx, expr, recv, arg, method_span); 318,549 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/manual_clear.rs:clippy_lints::methods::manual_clear::check (6x) 11 ( 0.00%) }, 420 ( 0.00%) (sym::unwrap, []) => { 1,680 ( 0.00%) unwrap_expect_used::check( . cx, . expr, . recv, . false, 210 ( 0.00%) self.allow_unwrap_in_consts, 210 ( 0.00%) self.allow_unwrap_in_tests, 210 ( 0.00%) &self.unwrap_allowed_ids, . &self.unwrap_allowed_aliases, . unwrap_expect_used::Variant::Unwrap, . ); . }, . (sym::unwrap_err, []) => { . unwrap_expect_used::check( . cx, . expr, -- line 5989 ---------------------------------------- -- line 5994 ---------------------------------------- . &self.unwrap_allowed_ids, . &self.unwrap_allowed_aliases, . unwrap_expect_used::Variant::Unwrap, . ); . }, . _ => {}, . } . } 50,088 ( 0.00%) } . } . 806 ( 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, . msrv: Msrv, . ) { . match method_call(recv) { 70 ( 0.00%) Some((name @ (sym::find | sym::position | sym::rposition), f_recv, [arg], span, _)) => { 18 ( 0.00%) search_is_some::check(cx, expr, name, is_some, f_recv, arg, recv, span); 7,310 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/search_is_some.rs:clippy_lints::methods::search_is_some::check (2x) 2 ( 0.00%) }, . Some((sym::get, f_recv, [arg], _, _)) => { 7 ( 0.00%) unnecessary_get_then_check::check(cx, call_span, recv, f_recv, arg, is_some); 197 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_get_then_check.rs:clippy_lints::methods::unnecessary_get_then_check::check (1x) 1 ( 0.00%) }, 78 ( 0.00%) Some((sym::first, f_recv, [], _, _)) => { . unnecessary_first_then_check::check(cx, call_span, recv, f_recv, is_some); . }, . Some((sym::filter, f_recv, [arg], _, _)) => { . manual_is_variant_and::check_is_some_is_none(cx, call_span, f_recv, arg, is_some, msrv); . }, . _ => {}, . } 496 ( 0.00%) } . . /// Used for `lint_binary_expr_with_method_call`. . #[derive(Copy, Clone)] . struct BinaryExprInfo<'a> { . expr: &'a Expr<'a>, . chain: &'a Expr<'a>, . 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) => { 2,136 ( 0.00%) if !$func($cx, $info) { . ::std::mem::swap(&mut $info.chain, &mut $info.other); 2,403 ( 0.00%) if $func($cx, $info) { 97,285 ( 0.00%) => /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 (267x) . 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 ---------------------------------------- 103,671 ( 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 . } . }}; 402,300 ( 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 . 9,209 ( 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 22 ( 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. 16 ( 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 124 ---------------------------------------- . // Using the intrinsic directly avoids emitting a UbCheck . *len = crate::intrinsics::unchecked_sub(*len, offset); . self.ptr . }, . // SAFETY: the caller guarantees that `offset` doesn't exceed `self.len()`, . // which is guaranteed to not overflow an `isize`. Also, the resulting pointer . // is in bounds of `slice`, which fulfills the other requirements for `offset`. . end => unsafe { 1 ( 0.00%) *end = end.sub(offset); . *end . }, . ) . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl ExactSizeIterator for $name<'_, T> { -- line 140 ---------------------------------------- -- 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. . 2,403 ( 0.00%) let ptr = self.ptr; 718 ( 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.) 5,370,246 ( 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. 63,803 ( 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()) . } 340 ( 0.00%) } . . fn next_chunk(&mut self) -> Result<[$elem; N], crate::array::IntoIter<$elem, N>> { . if T::IS_ZST || len!(self) < N { . return crate::array::iter_next_chunk(self); . } . . // SAFETY: the check above ensures len >= N . unsafe { -- line 200 ---------------------------------------- -- line 217 ---------------------------------------- . . #[inline] . fn count(self) -> usize { . len!(self) . } . . #[inline] . fn nth(&mut self, n: usize) -> Option<$elem> { 658 ( 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 16,141 ( 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) }; 350,737 ( 0.01%) if i == len { . break; . } . } 2,272 ( 0.00%) acc . } . . // We override the default implementation, which uses `try_fold`, . // because this simple implementation generates less LLVM IR and is . // faster to compile. . #[inline] . fn for_each(mut self, mut f: F) . where . Self: Sized, . F: FnMut(Self::Item), . { . while let Some(x) = self.next() { 18 ( 0.00%) f(x); . } . } . . // We override the default implementation, which uses `try_fold`, . // because this simple implementation generates less LLVM IR and is . // 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() { 50,530 ( 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() { 442,692 ( 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() { 836,780 ( 0.02%) 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() { 222,989 ( 0.01%) if let Some(y) = f(x) { 69,519 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:<&mut clippy_lints::lifetimes::report_elidable_lifetimes::{closure#0} as core::ops::function::FnMut<(&rustc_span::def_id::LocalDefId,)>>::call_mut (71x) . return Some(y); . } . } . None 5 ( 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() { 12,813 ( 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); . } 4,978 ( 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; 933 ( 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 ---------------------------------------- 5,531,333 ( 0.15%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_data_structures/src/sync/freeze.rs -------------------------------------------------------------------------------- Ir -- line 55 ---------------------------------------- . #[inline] . pub fn is_frozen(&self) -> bool { . self.frozen.load(Ordering::Acquire) . } . . /// Get the inner value if frozen. . #[inline] . pub fn get(&self) -> Option<&T> { 15 ( 0.00%) if self.frozen.load(Ordering::Acquire) { . // SAFETY: This is frozen so the data cannot be modified. . unsafe { Some(&*self.data.get()) } . } else { . hint::cold_path(); . None . } . } . . #[inline] . pub fn read(&self) -> FreezeReadGuard<'_, T> { . FreezeReadGuard { 43,802 ( 0.00%) _lock_guard: if self.frozen.load(Ordering::Acquire) { . None . } else { . Some(self.lock.read()) . }, . data: unsafe { NonNull::new_unchecked(self.data.get()) }, . } . } . -- line 83 ---------------------------------------- -- line 137 ---------------------------------------- . // the data cannot be modified and shared access is sound. . unsafe { &*self.data.as_ptr() } . } . } . . impl<'a, T: ?Sized> FreezeReadGuard<'a, T> { . #[inline] . pub fn map(this: Self, f: impl FnOnce(&T) -> &U) -> FreezeReadGuard<'a, U> { 26,064 ( 0.00%) FreezeReadGuard { data: NonNull::from(f(&*this)), _lock_guard: this._lock_guard } . } . } . . /// A guard holding mutable access to a `FreezeLock` which is in a locked state or frozen. . #[must_use = "if unused the FreezeLock may immediately unlock"] . pub struct FreezeWriteGuard<'a, T: ?Sized> { . _lock_guard: WriteGuard<'a, ()>, . frozen: &'a AtomicBool, -- line 153 ---------------------------------------- 21,901 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/manual_c_str_literals.rs -------------------------------------------------------------------------------- Ir -- line 13 ---------------------------------------- . . /// Checks: . /// - `b"...".as_ptr()` . /// - `b"...".as_ptr().cast()` . /// - `"...".as_ptr()` . /// - `"...".as_ptr().cast()` . /// . /// Iff the parent call of `.cast()` isn't `CStr::from_ptr`, to avoid linting twice. 168 ( 0.00%) pub(super) fn check_as_ptr<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'tcx>, . receiver: &'tcx Expr<'tcx>, . msrv: Msrv, . ) { 48 ( 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", . ); . } . }, . ); . } 192 ( 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 { 11,020 ( 0.00%) if let ExprKind::Path(QPath::TypeRelative(cstr, fn_name)) = &func.kind 5,145 ( 0.00%) && let TyKind::Path(QPath::Resolved(_, ty_path)) = &cstr.kind 2,058 ( 0.00%) && cx.tcx.lang_items().c_str() == ty_path.res.opt_def_id() 41,160 ( 0.00%) => ???:::lang_items (1,029x) . { . 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(..)` 19,299 ( 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), . _ => {}, . } . } 22,056 ( 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 ---------------------------------------- 8,232 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/numeric_arithmetic.rs -------------------------------------------------------------------------------- Ir -- line 9 ---------------------------------------- . pub struct Context { . expr_id: Option, . /// This field is used to check whether expressions are constants, such as in enum discriminants . /// and consts . const_span: Option, . } . impl Context { . fn skip_expr(&self, e: &hir::Expr<'_>) -> bool { 2,623 ( 0.00%) self.expr_id.is_some() || self.const_span.is_some_and(|span| span.contains(e.span)) 12,458 ( 0.00%) => ???:::contains (128x) . } . 12,985 ( 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<'_>, . ) { 2,111 ( 0.00%) if self.skip_expr(expr) { . return; . } 3,632 ( 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, . _ => (), . } . 6,615 ( 0.00%) let (l_ty, r_ty) = (cx.typeck_results().expr_ty(l), cx.typeck_results().expr_ty(r)); 58,888 ( 0.00%) => ???:::expr_ty (1,470x) . 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); . } 14,840 ( 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<'_>) { 14,770 ( 0.00%) let body_owner = cx.tcx.hir_body_owner(body.id()); 540,088 ( 0.01%) => ???:::hir_body_owner (2,954x) 5,908 ( 0.00%) let body_owner_def_id = cx.tcx.hir_body_owner_def_id(body.id()); 371,703 ( 0.01%) => ???:::hir_body_owner_def_id (2,954x) . 17,724 ( 0.00%) match cx.tcx.hir_body_owner_kind(body_owner_def_id) { 269,972 ( 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:: (2,954x) . hir::BodyOwnerKind::Static(_) | hir::BodyOwnerKind::Const { .. } => { 665 ( 0.00%) let body_span = cx.tcx.hir_span_with_body(body_owner); 9,969 ( 0.00%) => ???:::hir_span_with_body (133x) . 337 ( 0.00%) if let Some(span) = self.const_span 284 ( 0.00%) && span.contains(body_span) 7,244 ( 0.00%) => ???:::contains (71x) . { . return; . } 258 ( 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<'_>) { 8,862 ( 0.00%) let body_owner = cx.tcx.hir_body_owner(body.id()); 540,088 ( 0.01%) => ???:::hir_body_owner (2,954x) 8,862 ( 0.00%) let body_span = cx.tcx.hir_span_with_body(body_owner); 215,548 ( 0.01%) => ???:::hir_span_with_body (2,954x) . 6,104 ( 0.00%) if let Some(span) = self.const_span 784 ( 0.00%) && span.contains(body_span) 20,587 ( 0.00%) => ???:::contains (196x) . { . return; . } 2,820 ( 0.00%) self.const_span = None; . } . } 10,749 ( 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; . 19,299 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, func: &Expr<'_>, args: &[Expr<'_>]) { 12,049 ( 0.00%) if let ExprKind::Path(QPath::TypeRelative(ty, p)) = func.kind 4,487 ( 0.00%) && let TyKind::Path(QPath::Resolved(_, func_path)) = ty.kind 1,029 ( 0.00%) && p.ident.name == sym::new . && let Some(func_def_id) = func_path.res.opt_def_id() 371 ( 0.00%) && matches!( 1,484 ( 0.00%) cx.tcx.get_diagnostic_name(func_def_id), 21,231 ( 0.00%) => ???:::get_diagnostic_name (371x) . 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); . }); . } 22,056 ( 0.00%) } 2,513 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/redundant_allocation.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_hir::{self as hir, QPath, TyKind}; . use rustc_hir_analysis::lower_ty; . use rustc_lint::LateContext; . use rustc_middle::ty::TypeVisitableExt as _; . use rustc_span::symbol::sym; . . use super::{REDUNDANT_ALLOCATION, utils}; . 31,776 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, hir_ty: &hir::Ty<'tcx>, qpath: &QPath<'tcx>, def_id: DefId) -> bool { 2,648 ( 0.00%) let mut applicability = Applicability::MaybeIncorrect; 26,414 ( 0.00%) let outer_sym = match cx.tcx.get_diagnostic_name(def_id) { 163,600 ( 0.00%) => ???:::get_diagnostic_name (2,648x) 5,305 ( 0.00%) _ if Some(def_id) == cx.tcx.lang_items().owned_box() => "Box", 105,920 ( 0.00%) => ???:::lang_items (2,648x) . Some(sym::Rc) => "Rc", . Some(sym::Arc) => "Arc", . _ => return false, . }; . . if let Some(span) = utils::match_borrows_parameter(cx, qpath) { . let generic_snippet = snippet_with_applicability(cx, span, "..", &mut applicability); . span_lint_and_then( -- line 26 ---------------------------------------- -- line 33 ---------------------------------------- . diag.note(format!( . "`{generic_snippet}` is already a pointer, `{outer_sym}<{generic_snippet}>` allocates a pointer on the heap" . )); . }, . ); . return true; . } . 50 ( 0.00%) let Some(ty) = qpath_generic_tys(qpath).next() else { 475 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::qpath_generic_tys (25x) . return false; . }; . let Some(id) = ty.basic_res().opt_def_id() else { . return false; . }; 104 ( 0.00%) let (inner_sym, ty) = match cx.tcx.get_diagnostic_name(id) { 723 ( 0.00%) => ???:::get_diagnostic_name (13x) . Some(sym::Arc) => ("Arc", ty), . Some(sym::Rc) => ("Rc", ty), 26 ( 0.00%) _ if Some(id) == cx.tcx.lang_items().owned_box() => ("Box", ty), 520 ( 0.00%) => ???:::lang_items (13x) . _ => return false, . }; . . let TyKind::Path(inner_qpath) = &ty.kind else { . return false; . }; . let inner_span = match qpath_generic_tys(inner_qpath).next() { . Some(hir_ty) => { -- line 58 ---------------------------------------- -- line 99 ---------------------------------------- . )); . diag.help(format!( . "consider using just `{outer_sym}<{generic_snippet}>` or `{inner_sym}<{generic_snippet}>`" . )); . }, . ); . } . true 21,184 ( 0.00%) } 2,834 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/matches/collapsible_match.rs -------------------------------------------------------------------------------- Ir -- line 15 ---------------------------------------- . use rustc_lint::LateContext; . use rustc_middle::mir::FakeReadCause; . use rustc_middle::ty; . use rustc_span::{BytePos, Ident, Span, SyntaxContext}; . . use super::{COLLAPSIBLE_MATCH, pat_contains_disallowed_or}; . use crate::collapsible_if::{parens_around, peel_parens}; . 12,760 ( 0.00%) pub(super) fn check_match<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, arms: &'tcx [Arm<'_>], msrv: Msrv) { 2,580 ( 0.00%) if let Some(els_arm) = arms.iter().rfind(|arm| arm_is_wild_like(cx, arm)) { . let last_non_wildcard = arms.iter().rposition(|arm| !arm_is_wild_like(cx, arm)); . for (idx, arm) in arms.iter().enumerate() { . let only_wildcards_after = last_non_wildcard.is_none_or(|lnw| idx >= lnw); 5,170 ( 0.00%) check_arm( 35,345 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/matches/collapsible_match.rs:clippy_lints::matches::collapsible_match::check_arm (517x) . cx, 517 ( 0.00%) arm.span.ctxt(), . true, 517 ( 0.00%) arm.pat, . expr, 517 ( 0.00%) arm.body, . arm.guard, . Some(els_arm.body), . msrv, . only_wildcards_after, . ); . } . } 10,208 ( 0.00%) } . . pub(super) fn check_if_let<'tcx>( . cx: &LateContext<'tcx>, . ctxt: SyntaxContext, . pat: &'tcx Pat<'_>, . body: &'tcx Expr<'_>, . else_expr: Option<&'tcx Expr<'_>>, . let_expr: &'tcx Expr<'_>, . msrv: Msrv, . ) { 848 ( 0.00%) check_arm(cx, ctxt, false, pat, let_expr, body, None, else_expr, msrv, false); 7,802 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/matches/collapsible_match.rs:clippy_lints::matches::collapsible_match::check_arm (106x) . } . . #[expect(clippy::too_many_arguments, clippy::too_many_lines)] 9,345 ( 0.00%) fn check_arm<'tcx>( . cx: &LateContext<'tcx>, . ctxt: SyntaxContext, . outer_is_match: bool, . outer_pat: &'tcx Pat<'tcx>, . outer_cond: &'tcx Expr<'tcx>, . outer_then_body: &'tcx Expr<'tcx>, . outer_guard: Option<&'tcx Expr<'tcx>>, . outer_else_body: Option<&'tcx Expr<'tcx>>, . msrv: Msrv, . only_wildcards_after: bool, . ) { . let inner_expr = peel_blocks_with_stmt(outer_then_body); 2,552 ( 0.00%) if let Some(inner) = IfLetOrMatch::parse(cx, inner_expr) 13,086 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::parse (623x) 30 ( 0.00%) && let Some((inner_scrutinee, inner_then_pat, inner_else_body)) = match inner { . IfLetOrMatch::IfLet(scrutinee, pat, _, els, _) => Some((scrutinee, pat, els)), . IfLetOrMatch::Match(scrutinee, arms, ..) => { 30 ( 0.00%) if arms.len() == 2 && arms.iter().all(|a| a.guard.is_none()) . // if there are more than two arms, collapsing would be non-trivial . // one of the arms must be "wild-like" 15 ( 0.00%) && let Some(wild_idx) = arms.iter().rposition(|a| arm_is_wild_like(cx, a)) . { . let (then, els) = (&arms[1 - wild_idx], &arms[wild_idx]); . Some((scrutinee, then.pat, Some(els.body))) . } else { . None . } . }, . } -- line 85 ---------------------------------------- -- line 135 ---------------------------------------- . let outer_cond_msg = format!("use: `{}{}`", snippet(cx, outer_cond.span, ".."), method); . help_span.push_span_label(outer_cond.span, outer_cond_msg); . } . diag.span_help( . help_span, . "the outer pattern can be modified to include the inner pattern", . ); . }); 1,246 ( 0.00%) } else if outer_is_match // Leave if-let to the `collapsible_if` lint . && only_wildcards_after // adding a guard allows fall-through; unsafe if other arms follow 28 ( 0.00%) && let Some(inner) = If::hir(inner_expr) 14 ( 0.00%) && outer_pat.span.eq_ctxt(inner.cond.span) 28 ( 0.00%) && match (outer_else_body, inner.r#else) { . (None, None) => true, . (None, Some(e)) | (Some(e), None) => is_unit_expr(e), 6 ( 0.00%) (Some(a), Some(b)) => SpanlessEq::new(cx).eq_expr(ctxt, a, b), 4,218 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (2x) . } . && !pat_bindings_moved_or_mutated(cx, outer_pat, inner.cond) . { . span_lint_hir_and_then( . cx, . COLLAPSIBLE_MATCH, . inner_expr.hir_id, . inner_expr.span, -- line 158 ---------------------------------------- -- line 204 ---------------------------------------- . let else_inner_span = inner.then.span.shrink_to_hi().to(else_inner.span); . sugg.push((else_inner_span, String::new())); . } . . diag.multipart_suggestion("collapse nested if block", sugg, Applicability::MachineApplicable); . }, . ); . } 4,984 ( 0.00%) } . . /// A "wild-like" arm has a wild (`_`) or `None` pattern and no guard. Such arms can be "collapsed" . /// into a single wild arm without any significant loss in semantics or readability. . fn arm_is_wild_like(cx: &LateContext<'_>, arm: &Arm<'_>) -> bool { 3,296 ( 0.00%) if arm.guard.is_some() { . return false; . } 14,545 ( 0.00%) matches!(arm.pat.kind, PatKind::Binding(..) | PatKind::Wild) || is_none_pattern(cx, arm.pat) 59,615 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_none_pattern (2,547x) . } . . fn find_pat_binding_and_is_innermost_parent_pat_struct(pat: &Pat<'_>, hir_id: HirId) -> (Option<(Ident, Span)>, bool) { . let mut binding = None; . let mut is_innermost_parent_pat_struct = false; . pat.walk_short(|p| match p.kind { . // ignore OR patterns . PatKind::Or(_) => false, -- line 228 ---------------------------------------- 5,577 ( 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 { 23,148 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 5,536 ( 0.00%) if let ItemKind::Fn { . ref sig, 128 ( 0.00%) generics, 384 ( 0.00%) body: id, . .. 5,144 ( 0.00%) } = item.kind . { 768 ( 0.00%) check_fn_inner(cx, sig, Some(id), None, generics, item.span, true, self.msrv, || { . is_from_proc_macro(cx, item) . }); . } else if let ItemKind::Impl(impl_) = &item.kind 2,180 ( 0.00%) && !item.span.from_expansion() 902 ( 0.00%) && !is_from_proc_macro(cx, item) . { . report_extra_impl_lifetimes(cx, impl_); . } 20,576 ( 0.00%) } . 3,204 ( 0.00%) fn check_poly_trait_ref(&mut self, cx: &LateContext<'tcx>, poly_trait_ref: &'tcx PolyTraitRef<'tcx>) { 712 ( 0.00%) if !poly_trait_ref.span.from_expansion() { 598 ( 0.00%) report_extra_trait_object_lifetimes(cx, poly_trait_ref.bound_generic_params, &poly_trait_ref.trait_ref); . } 2,848 ( 0.00%) } . 17,521 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) { 17,218 ( 0.00%) if let ImplItemKind::Fn(ref sig, id) = item.kind { 7,206 ( 0.00%) let report_extra_lifetimes = trait_ref_of_method(cx, item.owner_id).is_none(); 357,793 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::trait_ref_of_method (2,402x) 2,402 ( 0.00%) check_fn_inner( . cx, . sig, . Some(id), . None, 4,804 ( 0.00%) item.generics, 2,402 ( 0.00%) item.span, . report_extra_lifetimes, 2,402 ( 0.00%) self.msrv, . || is_from_proc_macro(cx, item), . ); . } 20,024 ( 0.00%) } . 490 ( 0.00%) fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) { 280 ( 0.00%) if let TraitItemKind::Fn(ref sig, ref body) = item.kind { 770 ( 0.00%) let (body, trait_sig) = match *body { . TraitFn::Required(sig) => (None, Some(sig)), . TraitFn::Provided(id) => (Some(id), None), . }; 140 ( 0.00%) check_fn_inner( . cx, . sig, . body, . trait_sig, 140 ( 0.00%) item.generics, 70 ( 0.00%) item.span, . true, 70 ( 0.00%) self.msrv, . || is_from_proc_macro(cx, item), . ); . } 560 ( 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, . ) { 22,032 ( 0.00%) if span.in_external_macro(cx.sess().source_map()) || has_where_lifetimes(cx, generics) { 151,127 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::has_where_lifetimes (1,907x) . return; . } . 4,156 ( 0.00%) let types = generics . .params . .iter() 2,720 ( 0.00%) .filter(|param| matches!(param.kind, GenericParamKind::Type { .. })); . . for typ in types { 138 ( 0.00%) if !typ.span.eq_ctxt(span) { . return; . } . . for pred in generics.bounds_for_param(typ.def_id) { 130 ( 0.00%) if pred.origin == PredicateOrigin::WhereClause { . // has_where_lifetimes checked that this predicate contains no lifetime. . continue; . } . 108 ( 0.00%) for bound in pred.bounds { . let mut visitor = RefVisitor::new(cx); 363 ( 0.00%) walk_param_bound(&mut visitor, bound); 33,584 ( 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:: (85x) . if visitor.lts.iter().any(|lt| matches!(lt.kind, LifetimeKind::Param(_))) { . return; . } 242 ( 0.00%) if let GenericBound::Trait(ref trait_ref) = *bound { 363 ( 0.00%) let params = &trait_ref . .trait_ref . .path . .segments . .last() . .expect("a path must have at least one segment") . .args; 363 ( 0.00%) if let Some(params) = *params { 216 ( 0.00%) let lifetimes = params.args.iter().filter_map(|arg| match arg { . GenericArg::Lifetime(lt) => Some(lt), . _ => None, . }); 72 ( 0.00%) for bound in lifetimes { . if bound.kind != LifetimeKind::Static && !bound.is_elided() { . return; . } . } . } . } 70 ( 0.00%) } 522 ( 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) . } . } . 26,874 ( 0.00%) let elidable = could_use_elision(cx, sig.decl, body, trait_sig, generics.params, msrv); 5,252,764 ( 0.14%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::could_use_elision (1,881x) . let has_elidable_lts = elidable . .as_ref() . .is_some_and(|(_, usages)| !usages.iter().any(|usage| !usage.ident.span.eq_ctxt(span))); . . // Only check is_from_proc_macro if we're about to emit a lint (it's an expensive check) 6,797 ( 0.00%) if (has_elidable_lts || report_extra_lifetimes) && is_from_proc_macro() { . return; . } . 1,710 ( 0.00%) if let Some((elidable_lts, usages)) = elidable 2 ( 0.00%) && 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(); 6 ( 0.00%) report_elidable_lifetimes(cx, generics, &elidable_lts, &usages, include_suggestions); 439,351 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::report_elidable_lifetimes (1x) . } . 1,508 ( 0.00%) if report_extra_lifetimes { 8,525 ( 0.00%) self::report_extra_lifetimes(cx, sig.decl, generics); 715,414 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::report_extra_lifetimes (1,508x) . } . } . 31,170 ( 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 2,078 ( 0.00%) for arg in func.inputs { . input_visitor.visit_ty_unambig(arg); . } . // extract lifetimes in output type 6,030 ( 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); . } . 8,312 ( 0.00%) if input_visitor.abort() || output_visitor.abort() { 7 ( 0.00%) return None; . } . 8,284 ( 0.00%) let input_lts = input_visitor.lts; 10,355 ( 0.00%) let output_lts = output_visitor.lts; . 12,459 ( 0.00%) if let Some(&[trait_sig]) = trait_sig 198 ( 0.00%) && non_elidable_self_type(cx, func, trait_sig, msrv) 942 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::non_elidable_self_type (33x) . { . return None; . } . 4,142 ( 0.00%) if let Some(body_id) = body { 12,078 ( 0.00%) let body = cx.tcx.hir_body(body_id); 130,505 ( 0.00%) => ???:::hir_body (2,013x) . 3,808 ( 0.00%) let first_ident = body.params.first().and_then(|param| param.pat.simple_ident()); 12,078 ( 0.00%) if non_elidable_self_type(cx, func, first_ident, msrv) { 50,899 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::non_elidable_self_type (2,013x) . return None; . } . . let mut checker = BodyLifetimeChecker::new(cx); 6,039 ( 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) 39 ( 0.00%) && !allowed_lts.contains(&id) . { . return None; . } . } . . // check for higher-ranked trait bounds 4,046 ( 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 376 ---------------------------------------- . . // A lifetime can be newly elided if: . // - It occurs only once among the inputs. . // - If there are multiple input lifetimes, then the newly elided lifetime does not occur among the . // outputs (because eliding such an lifetime would create an ambiguity). . let elidable_lts = named_lifetime_occurrences(&input_lts) . .into_iter() . .filter_map(|(def_id, occurrences)| { 6 ( 0.00%) if occurrences == 1 6 ( 0.00%) && (input_lts.len() == 1 || !output_lts.iter().any(|lt| named_lifetime(lt) == Some(def_id))) . { . Some(def_id) . } else { . None . } . }) . .collect::>(); . 2,023 ( 0.00%) if elidable_lts.is_empty() { 2,022 ( 0.00%) return None; . } . 6 ( 0.00%) let usages = itertools::chain(input_lts, output_lts).collect(); . 18 ( 0.00%) Some((elidable_lts, usages)) 29,076 ( 0.00%) } . . fn allowed_lts_from(named_generics: &[GenericParam<'_>]) -> FxIndexSet { . named_generics . .iter() . .filter_map(|par| { 8,160 ( 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 8,184 ( 0.00%) fn non_elidable_self_type<'tcx>(cx: &LateContext<'tcx>, func: &FnDecl<'tcx>, ident: Option, msrv: Msrv) -> bool { 4,092 ( 0.00%) if let Some(ident) = ident 1,937 ( 0.00%) && ident.name == kw::SelfLower 4,683 ( 0.00%) && !func.implicit_self().has_implicit_self() 12,488 ( 0.00%) => ???:::implicit_self (1,561x) . && 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 . } 10,230 ( 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)); . } . } . } 6,480 ( 0.00%) occurrences . } . . fn named_lifetime(lt: &Lifetime) -> Option { 22,205 ( 0.00%) match lt.kind { 5,553 ( 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 { 38,341 ( 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); . } . 2,754 ( 0.00%) fn visit_poly_trait_ref(&mut self, poly_tref: &'tcx PolyTraitRef<'tcx>) { 306 ( 0.00%) let trait_ref = &poly_tref.trait_ref; 918 ( 0.00%) if let Some(id) = trait_ref.trait_def_id() 3,978 ( 0.00%) => ???:::trait_def_id (306x) 612 ( 0.00%) && lang_items::FN_TRAITS . .iter() 1,670 ( 0.00%) .any(|&item| self.cx.tcx.lang_items().get(item) == Some(id)) 33,400 ( 0.00%) => ???:::lang_items (835x) . { . let mut sub_visitor = RefVisitor::new(self.cx); . sub_visitor.visit_trait_ref(trait_ref); 25 ( 0.00%) self.nested_elision_site_lts.append(&mut sub_visitor.all_lts()); . } else { . walk_poly_trait_ref(self, poly_tref); . } 2,448 ( 0.00%) } . 82,304 ( 0.00%) fn visit_ty(&mut self, ty: &'tcx Ty<'_, AmbigArg>) { 51,440 ( 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()); . }, 33 ( 0.00%) TyKind::TraitObject(bounds, lt) => { . if !lt.is_elided() { 7 ( 0.00%) self.unelided_trait_object_lifetime = true; . } . for bound in bounds { 22 ( 0.00%) self.visit_poly_trait_ref(bound); 2,504 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:::visit_poly_trait_ref (11x) . } . }, 92,493 ( 0.00%) _ => walk_ty(self, ty), 834,211 ( 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:: (5,727x) . } 88 ( 0.00%) } . } . . /// Are any lifetimes mentioned in the `where` clause? If so, we don't try to . /// reason about elision. 16,832 ( 0.00%) fn has_where_lifetimes<'tcx>(cx: &LateContext<'tcx>, generics: &'tcx Generics<'_>) -> bool { . for predicate in generics.predicates { 790 ( 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 158 ( 0.00%) walk_unambig_ty(&mut visitor, pred.bounded_ty); 158 ( 0.00%) if !visitor.all_lts().is_empty() { . return true; . } . // if the bounds define new lifetimes, they are fine to occur 316 ( 0.00%) let allowed_lts = allowed_lts_from(pred.bound_generic_params); . // now walk the bounds 158 ( 0.00%) for bound in pred.bounds { . walk_param_bound(&mut visitor, bound); . } . // and check that all lifetimes are allowed 126 ( 0.00%) for lt in visitor.all_lts() { . if let Some(id) = named_lifetime(<) . && !allowed_lts.contains(&id) . { . return true; . } . } . }, . } . } . false 16,832 ( 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() 9,146 ( 0.00%) .filter_map(|par| match par.kind { . GenericParamKind::Lifetime { . kind: LifetimeParamKind::Explicit, 139 ( 0.00%) } => Some((par.def_id, Vec::new())), . _ => None, . }) . .collect(); . 9,820 ( 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)); . 990 ( 0.00%) self.bounded_ty_depth += 1; . try_visit!(self.visit_ty_unambig(bounded_ty)); 990 ( 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) { 21,584 ( 0.00%) if let LifetimeKind::Param(def_id) = lifetime.kind 24,746 ( 0.00%) && let Some(usages) = self.map.get_mut(&def_id) 30,084 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:, rustc_hash::FxBuildHasher>>::get_mut:: (2,228x) . { . usages.push(Usage { . lifetime: *lifetime, 468 ( 0.00%) in_where_predicate: self.where_predicate_depth != 0, 495 ( 0.00%) in_bounded_ty: self.bounded_ty_depth != 0, 520 ( 0.00%) in_generics_arg: self.generic_args_depth != 0, 234 ( 0.00%) lifetime_elision_impossible: self.lifetime_elision_impossible, . }); . } . } . 1,980 ( 0.00%) fn visit_where_predicate(&mut self, predicate: &'tcx WherePredicate<'tcx>) { 330 ( 0.00%) self.where_predicate_depth += 1; 330 ( 0.00%) if let &WherePredicateKind::BoundPredicate(WhereBoundPredicate { 330 ( 0.00%) bounded_ty, 660 ( 0.00%) bounds, 660 ( 0.00%) bound_generic_params, . origin: _, 660 ( 0.00%) }) = predicate.kind . { . self.visit_where_bound_predicate(predicate.hir_id, bounded_ty, bounds, bound_generic_params); . } else { . walk_where_predicate(self, predicate); . } 330 ( 0.00%) self.where_predicate_depth -= 1; 1,980 ( 0.00%) } . 1,572 ( 0.00%) fn visit_generic_args(&mut self, generic_args: &'tcx GenericArgs<'tcx>) -> Self::Result { 3,334 ( 0.00%) self.generic_args_depth += 1; . walk_generic_args(self, generic_args); 5,231 ( 0.00%) self.generic_args_depth -= 1; 1,572 ( 0.00%) } . . fn visit_fn_decl(&mut self, fd: &'tcx FnDecl<'tcx>) -> Self::Result { 2,554 ( 0.00%) self.lifetime_elision_impossible = !is_candidate_for_elision(fd); . walk_fn_decl(self, fd); 2,062 ( 0.00%) self.lifetime_elision_impossible = false; . } . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { 4,086 ( 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 { 431 ( 0.00%) ControlFlow::Break(lifetime.is_elided() || lifetime.is_anonymous()) . } . } . 10,310 ( 0.00%) if fd.lifetime_elision_allowed() 1,286 ( 0.00%) && let Return(ret_ty) = fd.output 1,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. 246 ( 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); . 1,196 ( 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", . ); . } . } . } . 17,050 ( 0.00%) fn report_extra_lifetimes<'tcx>(cx: &LateContext<'tcx>, func: &'tcx FnDecl<'_>, generics: &'tcx Generics<'_>) { 3,410 ( 0.00%) let mut checker = LifetimeChecker::::new(cx, generics.params); . 5,115 ( 0.00%) walk_generics(&mut checker, generics); 106,387 ( 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::> (1,705x) . walk_fn_decl(&mut checker, func); . 6,833 ( 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", . ); . } . } 13,640 ( 0.00%) } . . fn report_extra_impl_lifetimes<'tcx>(cx: &LateContext<'tcx>, impl_: &'tcx Impl<'_>) { 1,353 ( 0.00%) let mut checker = LifetimeChecker::::new(cx, impl_.generics.params); . 1,804 ( 0.00%) walk_generics(&mut checker, impl_.generics); 33,291 ( 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::> (451x) 1,353 ( 0.00%) if let Some(of_trait) = impl_.of_trait { . walk_trait_ref(&mut checker, &of_trait.trait_ref); . } 451 ( 0.00%) walk_unambig_ty(&mut checker, impl_.self_ty); 2,379 ( 0.00%) for &item in impl_.items { . walk_impl_item_ref(&mut checker, item); . } . 126 ( 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", . ); . } . } . 303 ( 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>, . ) { 2,255 ( 0.00%) let (elidable_lts, usages): (Vec<_>, Vec<_>) = map . .iter() . .filter_map(|(def_id, usages)| { 608 ( 0.00%) if let [ . Usage { . lifetime, . in_where_predicate: false, . lifetime_elision_impossible: false, . .. . }, . ] = usages.as_slice() . { . Some((def_id, lifetime)) . } else { . None . } . }) 902 ( 0.00%) .unzip(); 31,533 ( 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> (451x) . 451 ( 0.00%) if elidable_lts.is_empty() { . return; . } . 420 ( 0.00%) report_elidable_lifetimes(cx, impl_.generics, &elidable_lts, &usages, true); 916,789 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::report_elidable_lifetimes (70x) . } . . #[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. 1,065 ( 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`. 360 ( 0.00%) .filter_map(|&def_id| cx.tcx.hir_node_by_def_id(def_id).ident()) 266 ( 0.00%) => ???:::ident (19x) . .format(", "); . . let elidable_usages: Vec = usages . .iter() . .filter(|usage| named_lifetime(usage).is_some_and(|id| elidable_lts.contains(&id))) 1,112 ( 0.00%) .map(|usage| match cx.tcx.parent_hir_node(usage.hir_id) { 9,926 ( 0.00%) => ???:::parent_hir_node (91x) . Node::Ty(Ty { . kind: TyKind::Ref(..), .. . }) => ElidableUsage::Ref(usage.ident.span), . _ => ElidableUsage::Other(usage.ident.span), . }) . .collect(); . . let lint = if elidable_usages . .iter() 72 ( 0.00%) .any(|usage| matches!(usage, ElidableUsage::Other(_))) . { . ELIDABLE_LIFETIME_NAMES . } else { . NEEDLESS_LIFETIMES . }; . 497 ( 0.00%) span_lint_and_then( 883,572 ( 0.02%) => /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}> (71x) . cx, . lint, . elidable_lts . .iter() 90 ( 0.00%) .map(|<| cx.tcx.def_span(lt)) . .chain(usages.iter().filter_map(|usage| { 182 ( 0.00%) if let LifetimeKind::Param(def_id) = usage.kind . && elidable_lts.contains(&def_id) . { 91 ( 0.00%) return Some(usage.ident.span); . } . . None . })) . .collect_vec(), 213 ( 0.00%) format!("the following explicit lifetimes could be elided: {lts}"), 568 ( 0.00%) |diag| { 4 ( 0.00%) if !include_suggestions { . return; . } . 18 ( 0.00%) if let Some(suggestions) = elision_suggestions(cx, generics, elidable_lts, &elidable_usages) { 3,159 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:clippy_lints::lifetimes::elision_suggestions (2x) . diag.multipart_suggestion("elide the lifetimes", suggestions, Applicability::MachineApplicable); . } . }, . ); 568 ( 0.00%) } . 26 ( 0.00%) fn elision_suggestions( . cx: &LateContext<'_>, . generics: &Generics<'_>, . elidable_lts: &[LocalDefId], . usages: &[ElidableUsage], . ) -> Option> { 4 ( 0.00%) let explicit_params = generics . .params . .iter() . .filter(|param| !param.is_elided_lifetime() && !param.is_impl_trait()) . .collect::>(); . 5 ( 0.00%) let mut suggestions = if elidable_lts.len() == explicit_params.len() { . // if all the params are elided remove the whole generic block . // . // fn x<'a>() {} . // ^^^^ 5 ( 0.00%) vec![(generics.span, String::new())] . } else { . // 1. Start from the last elidable lifetime . // 2. While the lifetimes preceding it are also elidable, construct spans going from the current . // lifetime to the comma before it . // 3. Once this chain of elidable lifetimes stops, switch to constructing spans going from the . // current lifetime to the comma _after_ it 1 ( 0.00%) let mut end: Option = None; . elidable_lts . .iter() . .rev() . .map(|&id| { 1 ( 0.00%) let (idx, param) = explicit_params.iter().find_position(|param| param.def_id == id)?; . 1 ( 0.00%) let span = if let Some(next) = explicit_params.get(idx + 1) . && end != Some(next.def_id) . { . // Extend the current span forward, up until the next param in the list. . // fn x<'prev, 'a, 'next>() {} . // ^^^^ 8 ( 0.00%) param.span.until(next.span) 192 ( 0.00%) => ???:::until (1x) . } else { . // Extend the current span back to include the comma following the previous . // param. If the span of the next param in the list has already been . // extended, we continue the chain. This is why we're iterating in reverse. . end = Some(param.def_id); . . // `idx` will never be 0, else we'd be removing the entire list of generics . let prev = explicit_params.get(idx - 1)?; -- line 942 ---------------------------------------- -- line 947 ---------------------------------------- . }; . . Some((span, String::new())) . }) . .collect::>>()? . }; . . suggestions.extend(usages.iter().map(|&usage| { 6 ( 0.00%) match usage { . ElidableUsage::Ref(span) => { . // expand `&'a T` to `&'a T` . // ^^ ^^^ 6 ( 0.00%) let span = cx.sess().source_map().span_extend_while_whitespace(span); 1,866 ( 0.00%) => ???:::span_extend_while_whitespace (3x) . . (span, String::new()) . }, . ElidableUsage::Other(span) => { . // `T<'a>` and `impl Foo + 'a` should be replaced by `'_` . (span, String::from("'_")) . }, . } . })); . 8 ( 0.00%) Some(suggestions) 18 ( 0.00%) } . . struct BodyLifetimeChecker<'tcx> { . tcx: TyCtxt<'tcx>, . } . . impl<'tcx> BodyLifetimeChecker<'tcx> { . fn new(cx: &LateContext<'tcx>) -> Self { 2,013 ( 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<()> { 242 ( 0.00%) if !lifetime.is_anonymous() && lifetime.ident.name != kw::StaticLifetime { . return ControlFlow::Break(()); . } . ControlFlow::Continue(()) . } . } 59,350 ( 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 { 33,852 ( 0.00%) fn check_fn( . &mut self, . cx: &LateContext<'tcx>, . fn_kind: FnKind<'_>, . decl: &FnDecl<'tcx>, . _: &Body<'_>, . _: Span, . def_id: LocalDefId, . ) { 13,887 ( 0.00%) let is_in_trait_impl = if let hir::Node::Item(item) = cx . .tcx 5,642 ( 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) 353,985 ( 0.01%) => ???:::hir_get_parent_item (2,821x) . { 12,412 ( 0.00%) matches!(item.kind, ItemKind::Impl(hir::Impl { of_trait: Some(_), .. })) . } else { . false . }; . 5,642 ( 0.00%) let is_exported = cx.effective_visibilities.is_exported(def_id); 149,367 ( 0.00%) => ???:::is_exported (2,821x) . 3,906 ( 0.00%) self.check_fn_decl( . cx, . decl, . CheckTyContext { . is_in_trait_impl, 11,284 ( 0.00%) in_body: matches!(fn_kind, FnKind::Closure), . is_exported, . ..CheckTyContext::default() . }, . ); 22,568 ( 0.00%) } . . fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 7,716 ( 0.00%) let is_exported = cx.effective_visibilities.is_exported(item.owner_id.def_id); 137,019 ( 0.00%) => ???:::is_exported (2,572x) . 12,848 ( 0.00%) match item.kind { 160 ( 0.00%) ItemKind::Static(_, _, ty, _) | ItemKind::Const(_, _, ty, _) => self.check_ty( 9,721 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty (32x) . cx, . ty, . CheckTyContext { . is_exported, . ..CheckTyContext::default() . }, . ), . // functions, enums, structs, impls and traits are covered . _ => (), . } . } . 17,521 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'tcx>) { 5,006 ( 0.00%) match item.kind { 35 ( 0.00%) ImplItemKind::Const(ty, _) => { 140 ( 0.00%) let is_in_trait_impl = if let hir::Node::Item(item) = cx . .tcx 140 ( 0.00%) .hir_node_by_def_id(cx.tcx.hir_get_parent_item(item.hir_id()).def_id) 4,767 ( 0.00%) => ???:::hir_get_parent_item (35x) . { 280 ( 0.00%) matches!(item.kind, ItemKind::Impl(hir::Impl { of_trait: Some(_), .. })) . } else { . false . }; . 105 ( 0.00%) self.check_ty( 7,375 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty (35x) . 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(..) => (), . } 20,024 ( 0.00%) } . . fn check_field_def(&mut self, cx: &LateContext<'tcx>, field: &hir::FieldDef<'tcx>) { 1,420 ( 0.00%) if field.span.from_expansion() { . return; . } . 2,100 ( 0.00%) let is_exported = cx.effective_visibilities.is_exported(field.def_id); 30,585 ( 0.00%) => ???:::is_exported (700x) . 3,500 ( 0.00%) self.check_ty( 852,595 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty (700x) . cx, 700 ( 0.00%) field.ty, . CheckTyContext { . is_exported, . ..CheckTyContext::default() . }, . ); . } . 700 ( 0.00%) fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &TraitItem<'tcx>) { 210 ( 0.00%) let is_exported = cx.effective_visibilities.is_exported(item.owner_id.def_id); 3,990 ( 0.00%) => ???:::is_exported (70x) . . let context = CheckTyContext { . is_exported, . ..CheckTyContext::default() . }; . 560 ( 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. 140 ( 0.00%) if let TraitFn::Required(_) = trait_method { 174 ( 0.00%) self.check_fn_decl(cx, sig.decl, context); . } . }, . TraitItemKind::Type(..) => (), . } 152 ( 0.00%) } . . fn check_local(&mut self, cx: &LateContext<'tcx>, local: &LetStmt<'tcx>) { 6,198 ( 0.00%) if let Some(ty) = local.ty { 480 ( 0.00%) self.check_ty( 12,809 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty (160x) . 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. 8,463 ( 0.00%) if context.is_in_trait_impl { . return; . } . 2,011 ( 0.00%) for input in decl.inputs { 12,672 ( 0.00%) self.check_ty(cx, input, context); 1,493,629 ( 0.04%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty (3,072x) . } . 5,572 ( 0.00%) if let FnRetTy::Return(ty) = decl.output { 6,200 ( 0.00%) self.check_ty(cx, ty, context); 1,528,263 ( 0.04%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty (1,499x) . } . } . . /// 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. 79,013 ( 0.00%) fn check_ty<'tcx>(&mut self, cx: &LateContext<'tcx>, hir_ty: &hir::Ty<'tcx>, mut context: CheckTyContext) { 19,914 ( 0.00%) if hir_ty.span.from_expansion() { . return; . } . . // Skip trait implementations; see issue #605. 18,874 ( 0.00%) if context.is_in_trait_impl { . return; . } . 19,387 ( 0.00%) if !context.is_nested_call && type_complexity::check(cx, hir_ty, self.type_complexity_threshold) { . return; . } . 72,436 ( 0.00%) match hir_ty.kind { 19,743 ( 0.00%) TyKind::Path(ref qpath) if !context.in_body => { 13,084 ( 0.00%) let hir_id = hir_ty.hir_id; 19,626 ( 0.00%) let res = cx.qpath_res(qpath, hir_id); 117,530 ( 0.00%) => ???:::qpath_res (5,110x) . 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; 15,888 ( 0.00%) triggered |= box_collection::check(cx, hir_ty, qpath, def_id); 123,280 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/box_collection.rs:clippy_lints::types::box_collection::check (1,855x) 21,184 ( 0.00%) triggered |= redundant_allocation::check(cx, hir_ty, qpath, def_id); 261,014 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/redundant_allocation.rs:clippy_lints::types::redundant_allocation::check (1,855x) 18,536 ( 0.00%) triggered |= rc_buffer::check(cx, hir_ty, qpath, def_id); 172,569 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/rc_buffer.rs:clippy_lints::types::rc_buffer::check (1,855x) 23,832 ( 0.00%) triggered |= vec_box::check(cx, hir_ty, qpath, def_id, self.vec_box_size_threshold); 177,796 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/vec_box.rs:clippy_lints::types::vec_box::check (1,855x) 18,536 ( 0.00%) triggered |= option_option::check(cx, hir_ty, qpath, def_id); 202,968 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/option_option.rs:clippy_lints::types::option_option::check (1,855x) 15,888 ( 0.00%) triggered |= linked_list::check(cx, hir_ty, def_id); 144,040 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/linked_list.rs:clippy_lints::types::linked_list::check (1,855x) 21,184 ( 0.00%) triggered |= rc_mutex::check(cx, hir_ty, qpath, def_id); 160,871 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/rc_mutex.rs:clippy_lints::types::rc_mutex::check (1,855x) 13,240 ( 0.00%) triggered |= owned_cow::check(cx, qpath, def_id); 164,445 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/owned_cow.rs:clippy_lints::types::owned_cow::check (1,855x) . 42,278 ( 0.00%) if triggered { . return; . } . } 26,108 ( 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; 14,486 ( 0.00%) for ty in p.segments.iter().flat_map(|seg| { . seg.args . .as_ref() 2,538 ( 0.00%) .map_or_else(|| [].iter(), |params| params.args.iter()) 3,420 ( 0.00%) .filter_map(|arg| match arg { . GenericArg::Type(ty) => Some(ty), . _ => None, . }) . }) { 8,592 ( 0.00%) self.check_ty(cx, ty.as_unambig_ty(), context); 825,642 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty'2 (1,253x) . } . }, . QPath::TypeRelative(ty, seg) => { . context.is_nested_call = true; . self.check_ty(cx, ty, context); . if let Some(params) = seg.args { . for ty in params.args.iter().filter_map(|arg| match arg { . GenericArg::Type(ty) => Some(ty), -- line 651 ---------------------------------------- -- line 653 ---------------------------------------- . }) { . self.check_ty(cx, ty.as_unambig_ty(), context); . } . } . }, . } . }, . TyKind::Path(ref qpath) => { 234 ( 0.00%) let res = cx.qpath_res(qpath, hir_ty.hir_id); 897 ( 0.00%) => ???:::qpath_res (39x) . if let Some(def_id) = res.opt_def_id() . && self.is_type_change_allowed(context) . { 75 ( 0.00%) owned_cow::check(cx, qpath, def_id); 2,565 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/owned_cow.rs:clippy_lints::types::owned_cow::check (25x) . } . }, 4,310 ( 0.00%) TyKind::Ref(lt, ref mut_ty) => { . context.is_nested_call = true; 12,930 ( 0.00%) if !borrowed_box::check(cx, hir_ty, lt, mut_ty) { 74,467 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/borrowed_box.rs:clippy_lints::types::borrowed_box::check (2,103x) . self.check_ty(cx, mut_ty.ty, context); . } . }, 307 ( 0.00%) TyKind::Slice(ty) | TyKind::Array(ty, _) | TyKind::Ptr(MutTy { ty, .. }) => { . context.is_nested_call = true; . self.check_ty(cx, ty, context); . }, 117 ( 0.00%) TyKind::Tup(tys) => { . context.is_nested_call = true; . for ty in tys { 424 ( 0.00%) self.check_ty(cx, ty, context); 7,901 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_ty'2 (28x) . } . }, . _ => {}, . } 57,464 ( 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 ---------------------------------------- 57,832 ( 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 { 18,004 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 6,234 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), 1,682 ( 0.00%) items, . .. 2,180 ( 0.00%) }) = item.kind . { 1,682 ( 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`", . ); . } . } . } 20,576 ( 0.00%) } . } 841 ( 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 { 559,314 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 124,344 ( 0.00%) if let ExprKind::Cast(cast_from_expr, cast_to_hir) = expr.kind { 78 ( 0.00%) if expr.span.in_external_macro(cx.sess().source_map()) { . return; . } 130 ( 0.00%) if is_hir_ty_cfg_dependant(cx, cast_to_hir) { 312 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_hir_ty_cfg_dependant (26x) . return; . } . let (cast_from, cast_to) = ( 130 ( 0.00%) cx.typeck_results().expr_ty(cast_from_expr), 1,040 ( 0.00%) => ???:::expr_ty (26x) 104 ( 0.00%) cx.typeck_results().expr_ty(expr), 1,040 ( 0.00%) => ???:::expr_ty (26x) . ); . 208 ( 0.00%) if !expr.span.from_expansion() && unnecessary_cast::check(cx, expr, cast_from_expr, cast_from, cast_to) { 25,428 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/unnecessary_cast.rs:clippy_lints::casts::unnecessary_cast::check (26x) . return; . } 156 ( 0.00%) char_lit_as_u8::check(cx, expr, cast_from_expr, cast_to); 340 ( 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 (26x) 182 ( 0.00%) cast_slice_from_raw_parts::check(cx, expr, cast_from_expr, cast_to, self.msrv); 468 ( 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 (26x) . cast_ptr_alignment::check(cx, expr, cast_from, cast_to); 182 ( 0.00%) ptr_cast_constness::check(cx, expr, cast_from_expr, cast_from, cast_to, self.msrv); 444 ( 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 (26x) 312 ( 0.00%) ptr_as_ptr::check(cx, expr, cast_from_expr, cast_from, cast_to_hir, cast_to, self.msrv); 444 ( 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 (26x) . as_ptr_cast_mut::check(cx, expr, cast_from_expr, cast_to); 208 ( 0.00%) confusing_method_to_numeric_cast::check(cx, expr, cast_from_expr, cast_from, cast_to); 676 ( 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 (26x) . zero_ptr::check(cx, expr, cast_from_expr, cast_to_hir, self.msrv); . 156 ( 0.00%) if self.msrv.meets(cx, msrvs::MANUAL_DANGLING_PTR) { 702 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (26x) . manual_dangling_ptr::check(cx, expr, cast_from_expr, cast_to_hir); . } . . if cast_to.is_numeric() { 182 ( 0.00%) cast_possible_truncation::check(cx, expr, cast_from_expr, cast_from, cast_to, cast_to_hir.span); 47,400 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_possible_truncation.rs:clippy_lints::casts::cast_possible_truncation::check (26x) . if cast_from.is_numeric() { 184 ( 0.00%) cast_possible_wrap::check(cx, expr, cast_from_expr, cast_from, cast_to, self.msrv); 7,383 ( 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 (23x) 207 ( 0.00%) cast_precision_loss::check(cx, expr, cast_from, cast_to); 585 ( 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 (23x) . cast_sign_loss::check(cx, expr, cast_from_expr, cast_from, cast_to, self.msrv); 161 ( 0.00%) cast_abs_to_unsigned::check(cx, expr, cast_from_expr, cast_from, cast_to, self.msrv); 445 ( 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 (23x) 138 ( 0.00%) cast_nan_to_int::check(cx, expr, cast_from_expr, cast_from, cast_to); 460 ( 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 (23x) . } 260 ( 0.00%) cast_lossless::check(cx, expr, cast_from_expr, cast_from, cast_to, cast_to_hir, self.msrv); 10,969 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_lossless.rs:clippy_lints::casts::cast_lossless::check (26x) . cast_enum_constructor::check(cx, expr, cast_from_expr, cast_from); 156 ( 0.00%) fn_to_numeric_cast_any::check(cx, expr, cast_from_expr, cast_from, cast_to); 520 ( 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 (26x) 156 ( 0.00%) fn_to_numeric_cast::check(cx, expr, cast_from_expr, cast_from, cast_to); 749 ( 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 (26x) 156 ( 0.00%) fn_to_numeric_cast_with_truncation::check(cx, expr, cast_from_expr, cast_from, cast_to); 758 ( 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 (26x) . } . . as_underscore::check(cx, expr, cast_to_hir); 104 ( 0.00%) as_pointer_underscore::check(cx, cast_to, cast_to_hir); 260 ( 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 (26x) . 182 ( 0.00%) let was_borrow_as_ptr_emitted = self.msrv.meets(cx, msrvs::BORROW_AS_PTR) 702 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (26x) 182 ( 0.00%) && borrow_as_ptr::check(cx, expr, cast_from_expr, cast_to_hir, self.msrv); 468 ( 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 (26x) 234 ( 0.00%) if !was_borrow_as_ptr_emitted && self.msrv.meets(cx, msrvs::PTR_FROM_REF) { 702 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (26x) . ref_as_ptr::check(cx, expr, cast_from_expr, cast_to_hir); . } . } . 435,022 ( 0.01%) if self.msrv.meets(cx, msrvs::RAW_REF_OP) { 1,677,942 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (62,146x) . borrow_as_ptr::check_implicit_cast(cx, expr); . } 372,876 ( 0.01%) if self.msrv.meets(cx, msrvs::PTR_SLICE_RAW_PARTS) { 1,677,942 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (62,146x) 186,438 ( 0.01%) cast_slice_from_raw_parts::check_implicit_cast(cx, expr); 1,587,042 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_from_raw_parts.rs:clippy_lints::casts::cast_slice_from_raw_parts::check_implicit_cast (62,146x) . } 186,438 ( 0.01%) cast_ptr_alignment::check_cast_method(cx, expr); 876,151 ( 0.02%) => /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 (62,146x) 248,584 ( 0.01%) cast_slice_different_sizes::check(cx, expr, self.msrv); 10,885,376 ( 0.30%) => /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 (62,146x) 186,438 ( 0.01%) ptr_cast_constness::check_null_ptr_cast_method(cx, expr); 956,787 ( 0.03%) => /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 (62,146x) 497,168 ( 0.01%) } . . fn check_body(&mut self, cx: &LateContext<'tcx>, body: &rustc_hir::Body<'tcx>) { 8,862 ( 0.00%) needless_type_cast::check(cx, body); 3,416,446 ( 0.09%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/casts/needless_type_cast.rs:clippy_lints::casts::needless_type_cast::check (2,954x) . } . } 257 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 49,149 ( 0.00%) fn check_block(&mut self, cx: &LateContext<'tcx>, block: &'tcx Block<'_>) { 5,461 ( 0.00%) let ctxt = block.span.ctxt(); 32,766 ( 0.00%) if !ctxt.in_external_macro(cx.tcx.sess.source_map()) { 627,923 ( 0.02%) => ???:::in_external_macro (5,461x) 12,975 ( 0.00%) for [stmt1, stmt2] in block.stmts.array_windows::<2>() { 11,276 ( 0.00%) if let StmtKind::Expr(expr) | StmtKind::Semi(expr) = stmt2.kind 3,482 ( 0.00%) && stmt1.span.ctxt() == ctxt 3,392 ( 0.00%) && stmt2.span.ctxt() == ctxt 3,296 ( 0.00%) && expr.span.ctxt() == ctxt . { 6,156 ( 0.00%) handle_uninit_vec_pair(cx, ctxt, stmt1, expr); 92,748 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/uninit_vec.rs:clippy_lints::uninit_vec::handle_uninit_vec_pair (1,539x) . } . } . 7,350 ( 0.00%) if let (Some(stmt), Some(expr)) = (block.stmts.last(), block.expr) 1,934 ( 0.00%) && stmt.span.ctxt() == ctxt 1,858 ( 0.00%) && expr.span.ctxt() == ctxt . { 9,834 ( 0.00%) handle_uninit_vec_pair(cx, ctxt, stmt, expr); 59,922 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/uninit_vec.rs:clippy_lints::uninit_vec::handle_uninit_vec_pair (894x) . } . } 36,536 ( 0.00%) } . } . 24,330 ( 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>, . ) { 4,866 ( 0.00%) if let Some(vec) = extract_init_or_reserve_target(cx, maybe_init_or_reserve) 6 ( 0.00%) && let Some((set_len_self, call_span)) = extract_set_len_self(cx, maybe_set_len) . && vec.location.eq_expr(cx, ctxt, set_len_self) . && let ty::Ref(_, vec_ty, _) = cx.typeck_results().expr_ty_adjusted(set_len_self).kind() . && let ty::Adt(_, args) = vec_ty.kind() . // `#[allow(...)]` attribute can be set on enclosing unsafe block of `set_len()` . && !is_lint_allowed(cx, UNINIT_VEC, maybe_set_len.hir_id) . { . if vec.has_capacity() { . // with_capacity / reserve -> set_len -- line 104 ---------------------------------------- -- line 119 ---------------------------------------- . span_lint( . cx, . UNINIT_VEC, . vec![call_span, maybe_init_or_reserve.span], . "calling `set_len()` on empty `Vec` creates out-of-bound values", . ); . } . } 19,464 ( 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> { 9,225 ( 0.00%) match stmt.kind { . StmtKind::Let(local) => { 2,784 ( 0.00%) if let Some(init_expr) = local.init 6,995 ( 0.00%) && let PatKind::Binding(_, hir_id, _, None) = local.pat.kind 4,220 ( 0.00%) && let Some(init_kind) = get_vec_init_kind(cx, init_expr) 29,769 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::get_vec_init_kind (844x) . { . return Some(TargetVec { . location: VecLocation::Local(hir_id), . init_kind: Some(init_kind), . }); . } . }, 6,748 ( 0.00%) StmtKind::Expr(expr) | StmtKind::Semi(expr) => match expr.kind { 602 ( 0.00%) ExprKind::Assign(lhs, rhs, _span) => { 1,505 ( 0.00%) if let Some(init_kind) = get_vec_init_kind(cx, rhs) { 14,825 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::get_vec_init_kind (301x) . return Some(TargetVec { . location: VecLocation::Expr(lhs), . init_kind: Some(init_kind), . }); . } . }, 2,136 ( 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() 182 ( 0.00%) .expr_ty(self_expr) 7,280 ( 0.00%) => ???:::expr_ty (182x) . .peel_refs() . .is_diag_item(cx, sym::Vec) . && path.ident.name == sym::reserve . } . . /// Returns self if the expression is `Vec::set_len()` . fn extract_set_len_self<'tcx>(cx: &LateContext<'_>, expr: &'tcx Expr<'_>) -> Option<(&'tcx Expr<'tcx>, Span)> { . // peel unsafe blocks in `unsafe { vec.set_len() }` . let expr = peel_hir_expr_while(expr, |e| { 14 ( 0.00%) if let ExprKind::Block(block, _) = e.kind { . // Extract the first statement/expression . match (block.stmts.first().map(|stmt| &stmt.kind), block.expr) { . (None, Some(expr)) => Some(expr), . (Some(StmtKind::Expr(expr) | StmtKind::Semi(expr)), _) => Some(expr), . _ => None, . } . } else { . None . } . }); 14 ( 0.00%) match expr.kind { 8 ( 0.00%) ExprKind::MethodCall(path, self_expr, [arg], _) => { 2 ( 0.00%) let self_type = cx.typeck_results().expr_ty(self_expr).peel_refs(); 80 ( 0.00%) => ???:::expr_ty (2x) 4 ( 0.00%) if self_type.is_diag_item(cx, sym::Vec) && path.ident.name == sym::set_len && !is_integer_literal(arg, 0) { . Some((self_expr, expr.span)) . } else { . None . } . }, . _ => None, . } . } -- line 229 ---------------------------------------- 66,147 ( 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; . 182 ( 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, . ) { 52 ( 0.00%) if let ty::RawPtr(from_ty, from_mutbl) = cast_from.kind() 2 ( 0.00%) && let ty::RawPtr(to_ty, to_mutbl) = cast_to.kind() . && from_mutbl != to_mutbl . && from_ty == to_ty . && !from_ty.has_erased_regions() . { . if let ExprKind::Call(func, []) = cast_from_expr.kind . && let ExprKind::Path(QPath::Resolved(None, path)) = func.kind . && let Some(defid) = path.res.opt_def_id() . && let Some(prefix) = std_or_core(cx) -- line 30 ---------------------------------------- -- 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, . ); . } . } 208 ( 0.00%) } . 372,876 ( 0.01%) pub(super) fn check_null_ptr_cast_method(cx: &LateContext<'_>, expr: &Expr<'_>) { 141,222 ( 0.00%) if let ExprKind::MethodCall(method, cast_from_expr, [], _) = expr.kind 7,655 ( 0.00%) && let ExprKind::Call(func, []) = cast_from_expr.kind 12 ( 0.00%) && 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) . && let mut app = Applicability::MachineApplicable -- line 90 ---------------------------------------- -- 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, . ); . } 435,022 ( 0.01%) } -------------------------------------------------------------------------------- -- 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. 63,210 ( 0.00%) fn span_matches_pat(sess: &Session, span: Span, start_pat: Pat, end_pat: Pat) -> bool { 31,605 ( 0.00%) let pos = sess.source_map().lookup_byte_offset(span.lo()); 1,011,714 ( 0.03%) => ???:::lookup_byte_offset (6,321x) 12,642 ( 0.00%) let Some(ref src) = pos.sf.src else { . return false; . }; . let end = span.hi() - pos.sf.start_pos; 50,568 ( 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. 6,351 ( 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 == ','); 82,173 ( 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()) . }, 50,568 ( 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)), 925 ( 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, . }) 18,963 ( 0.00%) }) 56,889 ( 0.00%) } . . /// Get the search patterns to use for the given literal . fn lit_search_pat(lit: &LitKind) -> (Pat, Pat) { 76 ( 0.00%) match lit { 9 ( 0.00%) LitKind::Str(_, StrStyle::Cooked) => (Pat::Str("\""), Pat::Str("\"")), . LitKind::Str(_, StrStyle::Raw(0)) => (Pat::Str("r"), Pat::Str("\"")), . LitKind::Str(_, StrStyle::Raw(_)) => (Pat::Str("r#"), Pat::Str("#")), . LitKind::ByteStr(_, StrStyle::Cooked) => (Pat::Str("b\""), Pat::Str("\"")), . LitKind::ByteStr(_, StrStyle::Raw(0)) => (Pat::Str("br\""), Pat::Str("\"")), . LitKind::ByteStr(_, StrStyle::Raw(_)) => (Pat::Str("br#\""), Pat::Str("#")), . LitKind::Byte(_) => (Pat::Str("b'"), Pat::Str("'")), . LitKind::Char(_) => (Pat::Str("'"), Pat::Str("'")), . LitKind::Int(_, LitIntType::Signed(IntTy::Isize)) => (Pat::Num, Pat::Str("isize")), . LitKind::Int(_, LitIntType::Unsigned(UintTy::Usize)) => (Pat::Num, Pat::Str("usize")), 16 ( 0.00%) LitKind::Int(..) => (Pat::Num, Pat::Num), . LitKind::Float(..) => (Pat::Num, Pat::Str("")), 6 ( 0.00%) LitKind::Bool(true) => (Pat::Str("true"), Pat::Str("true")), . LitKind::Bool(false) => (Pat::Str("false"), Pat::Str("false")), . _ => (Pat::Str(""), Pat::Str("")), . } 8 ( 0.00%) } . . /// Get the search patterns to use for the given path 2,008 ( 0.00%) fn qpath_search_pat(path: &QPath<'_>) -> (Pat, Pat) { 4,016 ( 0.00%) match path { . QPath::Resolved(ty, path) => { 1,995 ( 0.00%) let start = if ty.is_some() { . Pat::Str("<") . } else { 1,995 ( 0.00%) path.segments.first().map_or(Pat::Str(""), |seg| { 3,990 ( 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| { 1,997 ( 0.00%) if seg.args.is_some() { . Pat::Str(">") . } else { . Pat::Sym(seg.ident.name) . } . }); 11,970 ( 0.00%) (start, end) . }, 104 ( 0.00%) QPath::TypeRelative(_, name) => (Pat::Str(""), Pat::Sym(name.ident.name)), . } 2,008 ( 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) { 86,418 ( 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. 19,156 ( 0.00%) if !e.span.eq_ctxt(outer_span) { . return (Pat::Str(""), Pat::Str("")); . } . 29,798 ( 0.00%) match e.kind { 30 ( 0.00%) ExprKind::ConstBlock(_) => (Pat::Str("const"), Pat::Str("}")), . // Parenthesis are trimmed from the text before the search patterns are matched. . // See: `span_matches_pat` . ExprKind::Tup([]) => (Pat::Str(")"), Pat::Str("(")), 4,872 ( 0.00%) ExprKind::Unary(UnOp::Deref, e) => (Pat::Str("*"), expr_search_pat_inner(tcx, e, outer_span).1), 27,388 ( 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 (257x) . 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), 88 ( 0.00%) ExprKind::Lit(lit) => lit_search_pat(&lit.node), 140 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::lit_search_pat (8x) 224 ( 0.00%) ExprKind::Array(_) | ExprKind::Repeat(..) => (Pat::Str("["), Pat::Str("]")), 1,356 ( 0.00%) ExprKind::Call(e, []) | ExprKind::MethodCall(_, e, [], _) => { 1,832 ( 0.00%) (expr_search_pat_inner(tcx, e, outer_span).0, Pat::Str("(")) 8,914 ( 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 (96x) . }, 86 ( 0.00%) ExprKind::Call(first, [.., last]) 84 ( 0.00%) | ExprKind::MethodCall(_, first, [.., last], _) . | ExprKind::Binary(_, first, last) . | ExprKind::Tup([first, .., last]) . | ExprKind::Assign(first, last, _) 296 ( 0.00%) | ExprKind::AssignOp(_, first, last) => ( 222 ( 0.00%) expr_search_pat_inner(tcx, first, outer_span).0, 4,505 ( 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 (48x) 592 ( 0.00%) expr_search_pat_inner(tcx, last, outer_span).1, 6,831 ( 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 (48x) . ), . ExprKind::Tup([e]) | ExprKind::DropTemps(e) => expr_search_pat_inner(tcx, e, outer_span), . ExprKind::Cast(e, _) | ExprKind::Type(e, _) => (expr_search_pat_inner(tcx, e, outer_span).0, Pat::Str("")), . ExprKind::Let(let_expr) => (Pat::Str("let"), expr_search_pat_inner(tcx, let_expr.init, outer_span).1), 6 ( 0.00%) ExprKind::If(..) => (Pat::Str("if"), Pat::Str("}")), . ExprKind::Loop(_, Some(_), _, _) | ExprKind::Block(_, Some(_)) => (Pat::Str("'"), Pat::Str("}")), . ExprKind::Loop(_, None, LoopSource::Loop, _) => (Pat::Str("loop"), Pat::Str("}")), . ExprKind::Loop(_, None, LoopSource::While, _) => (Pat::Str("while"), Pat::Str("}")), . ExprKind::Loop(_, None, LoopSource::ForLoop, _) | ExprKind::Match(_, _, MatchSource::ForLoopDesugar) => { . (Pat::Str("for"), Pat::Str("}")) . }, . ExprKind::Match(_, _, MatchSource::Normal) => (Pat::Str("match"), Pat::Str("}")), 8 ( 0.00%) ExprKind::Match(e, _, MatchSource::TryDesugar(_)) => { 56 ( 0.00%) (expr_search_pat_inner(tcx, e, outer_span).0, Pat::Str("?")) 184 ( 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 (4x) . }, . ExprKind::Match(e, _, MatchSource::AwaitDesugar) | ExprKind::Yield(e, YieldSource::Await { .. }) => { . (expr_search_pat_inner(tcx, e, outer_span).0, Pat::Str("await")) . }, 24 ( 0.00%) ExprKind::Closure(&Closure { body, .. }) => ( 32 ( 0.00%) Pat::Str(""), 72 ( 0.00%) expr_search_pat_inner(tcx, tcx.hir_body(body).value, outer_span).1, 1,747 ( 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 (8x) 608 ( 0.00%) => ???:::hir_body (8x) . ), . ExprKind::Block( . Block { . rules: BlockCheckMode::UnsafeBlock(UnsafeSource::UserProvided), . .. . }, . None, . ) => (Pat::Str("unsafe"), Pat::Str("}")), 2 ( 0.00%) ExprKind::Block(_, None) => (Pat::Str("{"), Pat::Str("}")), 5,889 ( 0.00%) ExprKind::Field(e, name) => (expr_search_pat_inner(tcx, e, outer_span).0, Pat::Sym(name.name)), 1,879 ( 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 (18x) 8,770 ( 0.00%) ExprKind::Index(e, _, _) => (expr_search_pat_inner(tcx, e, outer_span).0, Pat::Str("]")), 69,132 ( 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 (614x) 22,077 ( 0.00%) ExprKind::Path(ref path) => qpath_search_pat(path), 5,242 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::qpath_search_pat (160x) 6,224 ( 0.00%) ExprKind::AddrOf(_, _, e) => (Pat::Str("&"), expr_search_pat_inner(tcx, e, outer_span).1), 108,831 ( 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 (777x) . 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")), 42 ( 0.00%) ExprKind::Ret(Some(e)) => (Pat::Str("return"), expr_search_pat_inner(tcx, e, outer_span).1), 1,086 ( 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 (6x) 10 ( 0.00%) ExprKind::Struct(path, _, _) => (qpath_search_pat(path).0, Pat::Str("}")), 33 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::qpath_search_pat (1x) . ExprKind::Yield(e, YieldSource::Yield) => (Pat::Str("yield"), expr_search_pat_inner(tcx, e, outer_span).1), . _ => (Pat::Str(""), Pat::Str("")), . } 22,288 ( 0.00%) } . 5,940 ( 0.00%) expr_search_pat_inner(tcx, e, e.span) 385,796 ( 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 (1,980x) . } . . fn fn_header_search_pat(header: FnHeader) -> Pat { 3,407 ( 0.00%) if header.is_async() { . Pat::Str("async") 6,814 ( 0.00%) } else if matches!(header.constness, rustc_hir::Constness::Const { always: false }) { . Pat::Str("const") . } else if header.is_unsafe() { . Pat::Str("unsafe") 10,029 ( 0.00%) } else if header.abi != ExternAbi::Rust { . Pat::Str("extern") . } else { . Pat::MultiStr(&["fn", "extern"]) . } . } . . fn item_search_pat(item: &Item<'_>) -> (Pat, Pat) { 9,473 ( 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(";")), 693 ( 0.00%) ItemKind::Fn { sig, .. } => (fn_header_search_pat(sig.header), Pat::Str("")), . ItemKind::ForeignMod { .. } => (Pat::Str("extern"), Pat::Str("}")), . ItemKind::TyAlias(..) => (Pat::Str("type"), Pat::Str(";")), . ItemKind::Enum(..) => (Pat::Str("enum"), Pat::Str("}")), . ItemKind::Struct(_, _, VariantData::Struct { .. }) => (Pat::Str("struct"), Pat::Str("}")), . ItemKind::Struct(..) => (Pat::Str("struct"), Pat::Str(";")), . ItemKind::Union(..) => (Pat::Str("union"), Pat::Str("}")), . ItemKind::Trait { . safety: Safety::Unsafe, .. -- line 270 ---------------------------------------- -- line 284 ---------------------------------------- . ItemKind::Macro(_, def, _) => ( . Pat::Str(if def.macro_rules { "macro_rules" } else { "macro" }), . Pat::Str(""), . ), . ItemKind::TraitAlias(..) => (Pat::Str("trait"), Pat::Str(";")), . ItemKind::GlobalAsm { .. } => return (Pat::Str("global_asm"), Pat::Str("")), . ItemKind::Use(..) => return (Pat::Str(""), Pat::Str("")), . }; 1,388 ( 0.00%) if item.vis_span.is_empty() { 4,824 ( 0.00%) (start_pat, end_pat) . } else { 1,264 ( 0.00%) (Pat::Str("pub"), end_pat) . } . } . . fn trait_item_search_pat(item: &TraitItem<'_>) -> (Pat, Pat) { 1,254 ( 0.00%) match &item.kind { . TraitItemKind::Const(..) => (Pat::Str("const"), Pat::Str(";")), . TraitItemKind::Type(..) => (Pat::Str("type"), Pat::Str(";")), 342 ( 0.00%) TraitItemKind::Fn(sig, ..) => (fn_header_search_pat(sig.header), Pat::Str("")), . } . } . . fn impl_item_search_pat(item: &ImplItem<'_>) -> (Pat, Pat) { 36,584 ( 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(";")), 4,304 ( 0.00%) ImplItemKind::Fn(sig, ..) => (fn_header_search_pat(sig.header), Pat::Str("")), . }; 6,456 ( 0.00%) if let ImplItemImplKind::Inherent { vis_span, .. } = item.impl_kind 2,156 ( 0.00%) && !vis_span.is_empty() . { 5,388 ( 0.00%) start_pat = Pat::Str("pub"); . } 25,824 ( 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)), . } . } . 8,190 ( 0.00%) fn fn_kind_pat(tcx: TyCtxt<'_>, kind: &FnKind<'_>, body: &Body<'_>, hir_id: HirId) -> (Pat, Pat) { 10,680 ( 0.00%) let (mut start_pat, end_pat) = match kind { 120 ( 0.00%) FnKind::ItemFn(.., header) => (fn_header_search_pat(*header), Pat::Str("")), 1,580 ( 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), . }; 8,308 ( 0.00%) match tcx.hir_node(hir_id) { 57,239 ( 0.00%) => ???:::hir_node (910x) 360 ( 0.00%) Node::Item(Item { vis_span, .. }) . | Node::ImplItem(ImplItem { 788 ( 0.00%) impl_kind: ImplItemImplKind::Inherent { vis_span, .. }, . .. . }) => { 2,296 ( 0.00%) if !vis_span.is_empty() { . start_pat = Pat::Str("pub"); . } . }, . Node::ImplItem(_) | Node::TraitItem(_) => {}, . _ => start_pat = Pat::Str(""), . } 9,100 ( 0.00%) (start_pat, end_pat) 8,190 ( 0.00%) } . . fn attr_search_pat(attr: &Attribute) -> (Pat, Pat) { . match attr.kind { . AttrKind::Normal(..) => { . if let Some(name) = attr.name() { . // NOTE: This will likely have false positives, like `allow = 1` . (Pat::Attr(name), Pat::Str("")) . } else { -- line 369 ---------------------------------------- -- line 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>; 21,434 ( 0.00%) fn search_pat(&$self, $cx_ident: &Self::Context) -> (Pat, Pat) { . $fn($($args)*) 26,432 ( 0.00%) } . fn span(&self) -> Span { . self.span . } . } . }; . } 1,980 ( 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) { 6,370 ( 0.00%) fn_kind_pat(cx.tcx, self.0, self.1, self.2) 180,322 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::fn_kind_pat (910x) . } . . 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. 156 ( 0.00%) pub fn is_from_proc_macro<'cx, T: WithSearchPat<'cx>>(cx: &T::Context, item: &T) -> bool { 17,156 ( 0.00%) let (start_pat, end_pat) = item.search_pat(cx); 149 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:::search_pat (1x) 72,332 ( 0.00%) !span_matches_pat(cx.sess(), item.span(), start_pat, end_pat) 436 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::span_matches_pat (1x) 104 ( 0.00%) } . . /// Checks if the span actually refers to a match expression . pub fn is_span_match(cx: &impl LintContext, span: Span) -> bool { 3,770 ( 0.00%) span_matches_pat(cx.sess(), span, Pat::Str("match"), Pat::Str("}")) 126,554 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::span_matches_pat (290x) . } . . /// Checks if the span actually refers to an if expression . pub fn is_span_if(cx: &impl LintContext, span: Span) -> bool { 2,715 ( 0.00%) span_matches_pat(cx.sess(), span, Pat::Str("if"), Pat::Str("}")) 64,662 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::span_matches_pat (181x) . } 105,523 ( 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; . 38,227 ( 0.00%) pub(super) fn check_block<'tcx>(cx: &LateContext<'tcx>, block: &'tcx Block<'_>) { . // we need both a let-binding stmt and an expr 16,383 ( 0.00%) if let Some(retexpr) = block.expr 4,983 ( 0.00%) && let Some(stmt) = block.stmts.last() 2,388 ( 0.00%) && let StmtKind::Let(local) = &stmt.kind 1,182 ( 0.00%) && local.ty.is_none() 539 ( 0.00%) && local.els.is_none() 3,773 ( 0.00%) && cx.tcx.hir_attrs(local.hir_id).is_empty() 38,873 ( 0.00%) => ???:::hir_attrs (539x) 2,156 ( 0.00%) && let Some(initexpr) = &local.init 1,617 ( 0.00%) && let PatKind::Binding(_, local_id, _, _) = local.pat.kind 1 ( 0.00%) && retexpr.res_local_id() == Some(local_id) 3 ( 0.00%) && (cx.sess().edition() >= Edition::Edition2024 || !last_statement_borrows(cx, initexpr)) . && !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( . cx, . LET_AND_RETURN, -- line 35 ---------------------------------------- -- line 60 ---------------------------------------- . err.multipart_suggestion( . "return the expression directly", . vec![(local.span, String::new()), (retexpr.span, sugg)], . app, . ); . }, . ); . } 38,227 ( 0.00%) } . fn last_statement_borrows<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> bool { . for_each_expr(cx.tcx, expr, |e| { 8 ( 0.00%) if let Some(def_id) = fn_def_id(cx, e) 35 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_def_id (1x) 1 ( 0.00%) && cx . .tcx . .fn_sig(def_id) . .instantiate_identity() . .skip_norm_wip() . .skip_binder() . .output() 3 ( 0.00%) .walk() 7 ( 0.00%) => ???:::walk (1x) 2 ( 0.00%) .any(|arg| matches!(arg.kind(), GenericArgKind::Lifetime(re) if !re.is_static())) . { . ControlFlow::Break(()) . } else { . ControlFlow::Continue(()) . } . }) . .is_some() . } -- line 88 ---------------------------------------- 598 ( 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 { 186,438 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 139,662 ( 0.00%) if let ExprKind::MethodCall(path, receiver, [arg], _) = &expr.kind 4,372 ( 0.00%) && let ExprKind::Lit(lit) = &arg.kind 1,617 ( 0.00%) && LitKind::Bool(false) == lit.node 1,611 ( 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 (231x) 56 ( 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", . ); . }, . ); . } 248,584 ( 0.01%) } . } 259 ( 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`]. 9,113 ( 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 { 25,624 ( 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. 8,690 ( 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 ---------------------------------------- 9,028 ( 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/sharded.rs -------------------------------------------------------------------------------- Ir -- line 87 ---------------------------------------- . #[track_caller] . pub fn lock_shard_by_hash(&self, hash: u64) -> LockGuard<'_, T> { . self.lock_shard_by_index(get_shard_hash(hash)) . } . . #[inline] . #[track_caller] . pub fn lock_shard_by_index(&self, i: usize) -> LockGuard<'_, T> { 52,604 ( 0.00%) match self { . Self::Single(single) => { . // Synchronization is disabled so use the `lock_assume_no_sync` method optimized . // for that case. . . // SAFETY: We know `is_dyn_thread_safe` was false when creating the lock thus . // `might_be_dyn_thread_safe` was also false. . unsafe { single.lock_assume(Mode::NoSync) } . } -- line 103 ---------------------------------------- -- line 148 ---------------------------------------- . } . pub fn len(&self) -> usize { . self.lock_shards().map(|shard| shard.len()).sum() . } . } . . impl ShardedHashMap { . #[inline] 57,778 ( 0.00%) pub fn get(&self, key: &Q) -> Option . where . K: Borrow, . Q: Hash + Eq, . V: Clone, . { . let hash = make_hash(key); . let shard = self.lock_shard_by_hash(hash); . let (_, value) = shard.find(hash, |(k, _)| k.borrow() == key)?; 37,936 ( 0.00%) Some(value.clone()) 69,989 ( 0.00%) } . . #[inline] . pub fn get_or_insert_with(&self, key: K, default: impl FnOnce() -> V) -> V . where . V: Copy, . { . let hash = make_hash(&key); . let mut shard = self.lock_shard_by_hash(hash); -- line 174 ---------------------------------------- 32,684 ( 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)] 497,168 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 124,292 ( 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 76 ---------------------------------------- . else { . return; . }; . . let Some((map_ty, contains_expr)) = try_parse_contains(cx, cond_expr) else { . return; . }; . 18 ( 0.00%) let Some(then_search) = find_insert_calls(cx, &contains_expr, then_expr) else { 21,647 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/entry.rs:clippy_lints::entry::find_insert_calls (2x) . return; . }; . 6 ( 0.00%) let lint_msg = format!("usage of `contains_key` followed by `insert` on a `{}`", map_ty.name()); 4 ( 0.00%) let mut app = Applicability::MachineApplicable; 12 ( 0.00%) let map_str = snippet_with_context(cx, contains_expr.map.span, contains_expr.call_ctxt, "..", &mut app).0; 10 ( 0.00%) let key_str = snippet_with_context(cx, contains_expr.key.span, contains_expr.call_ctxt, "..", &mut app).0; . 6 ( 0.00%) let sugg = if let Some(else_expr) = else_expr { . let Some(else_search) = find_insert_calls(cx, &contains_expr, else_expr) else { . return; . }; . . if then_search.edits.is_empty() && else_search.edits.is_empty() { . // No insertions . return; . } else if then_search.is_key_used_and_no_copy || else_search.is_key_used_and_no_copy { -- line 101 ---------------------------------------- -- line 123 ---------------------------------------- . ), . }; . Some(format!( . "if let {}::{entry_kind} = {map_str}.entry({key_str}) {then_str} else {else_str}", . map_ty.entry_path(), . )) . } else { . // if .. { insert } else { insert } 381 ( 0.00%) let ((then_str, then_entry), (else_str, else_entry)) = if contains_expr.negated { . ( . then_search.snippet_vacant(cx, then_expr.span, &mut app), . else_search.snippet_occupied(cx, else_expr.span, &mut app), . ) . } else { . ( . then_search.snippet_occupied(cx, then_expr.span, &mut app), . else_search.snippet_vacant(cx, else_expr.span, &mut app), -- line 139 ---------------------------------------- -- line 145 ---------------------------------------- . "match {map_str}.entry({key_str}) {{\n{indent_str} {entry}::{then_entry} => {}\n\ . {indent_str} {entry}::{else_entry} => {}\n{indent_str}}}", . reindent_multiline(&then_str, true, Some(4 + indent_str.len())), . reindent_multiline(&else_str, true, Some(4 + indent_str.len())), . entry = map_ty.entry_path(), . )) . } . } else { 2 ( 0.00%) if then_search.edits.is_empty() { . // no insertions . return; . } . . // if .. { insert } . if !then_search.allow_insert_closure { . let (body_str, entry_kind) = if contains_expr.negated { . then_search.snippet_vacant(cx, then_expr.span, &mut app) -- line 161 ---------------------------------------- -- 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() . ), . ); . } 497,180 ( 0.01%) } 76 ( 0.00%) => ???:__rustc::__rdl_dealloc (2x) . } . . #[derive(Clone, Copy)] . enum MapType { . Hash, . BTree, . } . impl MapType { . fn name(self) -> &'static str { 16 ( 0.00%) match self { . Self::Hash => "HashMap", . Self::BTree => "BTreeMap", . } . } . fn entry_path(self) -> &'static str { . match self { . Self::Hash => "std::collections::hash_map::Entry", . Self::BTree => "std::collections::btree_map::Entry", -- line 231 ---------------------------------------- -- 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,362 ( 0.00%) let expr = peel_hir_expr_while(expr, |e| match e.kind { 127 ( 0.00%) ExprKind::Unary(UnOp::Not, e) => { . negated = !negated; . Some(e) . }, . _ => None, . }); . 2,840 ( 0.00%) if let ExprKind::MethodCall(_, map, [arg], _) = expr.kind 274 ( 0.00%) && let Expr { . kind: ExprKind::AddrOf(_, _, key), . span: key_span, . .. . } = arg 14 ( 0.00%) && key_span.eq_ctxt(expr.span) . { 28 ( 0.00%) let id = cx.typeck_results().type_dependent_def_id(expr.hir_id)?; 357 ( 0.00%) => ???:::type_dependent_def_id (7x) . let expr = ContainsExpr { . negated, . map, 7 ( 0.00%) key, 7 ( 0.00%) call_ctxt: expr.span.ctxt(), . }; 46 ( 0.00%) match cx.tcx.get_diagnostic_name(id) { 466 ( 0.00%) => ???:::get_diagnostic_name (7x) . Some(sym::btreemap_contains_key) => Some((MapType::BTree, expr)), . Some(sym::hashmap_contains_key) => Some((MapType::Hash, expr)), . _ => None, . } . } else { . None . } . } -- line 294 ---------------------------------------- -- line 311 ---------------------------------------- . /// The value to insert. . value: &'tcx Expr<'tcx>, . } . . /// Inspect the given expression and return details about the `insert` call. . /// . /// If the given expression is not an `insert` call into a `BTreeMap` or a `HashMap`, return `None`. . fn try_parse_insert<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option> { 50 ( 0.00%) if let ExprKind::MethodCall(_, map, [key, value], _) = expr.kind { . let id = cx.typeck_results().type_dependent_def_id(expr.hir_id)?; . if let Some(insert) = cx.tcx.get_diagnostic_name(id) . && matches!(insert, sym::btreemap_insert | sym::hashmap_insert) . { . Some(InsertExpr { map, key, value }) . } else { . None . } -- line 327 ---------------------------------------- -- line 421 ---------------------------------------- . walk_expr(self, e.key); . walk_expr(self, e.value); . self.in_tail_pos = in_tail_pos; . self.allow_insert_closure = allow_insert_closure; . self.is_single_insert = is_single_insert; . } . } . impl<'tcx> Visitor<'tcx> for InsertSearcher<'_, 'tcx> { 10 ( 0.00%) fn visit_stmt(&mut self, stmt: &'tcx Stmt<'_>) { 10 ( 0.00%) match stmt.kind { 2 ( 0.00%) StmtKind::Semi(e) => { 6 ( 0.00%) self.visit_expr(e); 18,582 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/entry.rs:::visit_expr'2 (2x) . 4 ( 0.00%) if self.in_tail_pos && self.allow_insert_closure { . // The spans are used to slice the top level expression into multiple parts. This requires that . // they all come from the same part of the source code. . if stmt.span.ctxt() == self.ctxt && e.span.ctxt() == self.ctxt { . self.edits . .push(Edit::RemoveSemi(stmt.span.trim_start(e.span).unwrap_or(DUMMY_SP))); . } else { . self.allow_insert_closure = false; . } -- line 442 ---------------------------------------- -- line 455 ---------------------------------------- . self.visit_block(els); . } . }, . StmtKind::Item(_) => { . self.allow_insert_closure &= !self.in_tail_pos; . self.is_single_insert = false; . }, . } 10 ( 0.00%) } . 16 ( 0.00%) fn visit_block(&mut self, block: &'tcx Block<'_>) { . // If the block is in a tail position, then the last expression (possibly a statement) is in the . // tail position. The rest, however, are not. 10 ( 0.00%) match (block.stmts, block.expr) { 4 ( 0.00%) ([], None) => { . self.allow_insert_closure &= !self.in_tail_pos; . }, . ([], Some(expr)) => self.visit_expr(expr), . (stmts, Some(expr)) => { . let in_tail_pos = self.in_tail_pos; . self.in_tail_pos = false; . for stmt in stmts { . self.visit_stmt(stmt); . } . self.in_tail_pos = in_tail_pos; . self.visit_expr(expr); . }, 8 ( 0.00%) ([stmts @ .., stmt], None) => { 2 ( 0.00%) let in_tail_pos = self.in_tail_pos; 2 ( 0.00%) self.in_tail_pos = false; . for stmt in stmts { . self.visit_stmt(stmt); . } 2 ( 0.00%) self.in_tail_pos = in_tail_pos; 20 ( 0.00%) self.visit_stmt(stmt); 18,626 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/entry.rs:::visit_stmt (2x) . }, . } . } . 112 ( 0.00%) fn visit_expr(&mut self, expr: &'tcx Expr<'_>) { 32 ( 0.00%) if !self.can_use_entry { . return; . } . . match try_parse_insert(self.cx, expr) { . Some(insert_expr) if self.spanless_eq.eq_expr(self.ctxt, self.map, insert_expr.map) => { . self.visit_insert_expr_arguments(&insert_expr); . // Multiple inserts, inserts with a different key, and inserts from a macro can't use the entry api. . if self.is_map_used -- line 503 ---------------------------------------- -- line 515 ---------------------------------------- . self.is_map_used = true; . self.allow_insert_closure &= self.in_tail_pos; . . // The value doesn't affect whether there is only a single insert expression. . let is_single_insert = self.is_single_insert; . self.visit_non_tail_expr(insert_expr.value); . self.is_single_insert = is_single_insert; . }, 128 ( 0.00%) _ if is_any_expr_in_map_used(self.cx, &mut self.spanless_eq, self.ctxt, self.map, expr) => { 1 ( 0.00%) self.is_map_used = true; . }, 107 ( 0.00%) _ if self.spanless_eq.eq_expr(self.ctxt, self.key, expr) => { 562 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (2x) 2 ( 0.00%) self.is_key_used = true; . }, 69 ( 0.00%) _ => match expr.kind { . ExprKind::If(cond_expr, then_expr, Some(else_expr)) => { . self.is_single_insert = false; . self.visit_non_tail_expr(cond_expr); . // Each branch may contain its own insert expression. . let mut is_map_used = self.visit_cond_arm(then_expr); . is_map_used |= self.visit_cond_arm(else_expr); . self.is_map_used = is_map_used; . }, -- line 537 ---------------------------------------- -- line 563 ---------------------------------------- . // Don't allow insertions inside of a loop. . let edit_len = self.edits.len(); . self.visit_block(block); . if self.edits.len() != edit_len { . self.can_use_entry = false; . } . self.loops.pop(); . }, 8 ( 0.00%) ExprKind::Block(block, _) => self.visit_block(block), 18,692 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/entry.rs:::visit_block (2x) . ExprKind::InlineAsm(_) => { . self.can_use_entry = false; . }, 11 ( 0.00%) ExprKind::Closure(closure) => walk_body(self, self.cx.tcx.hir_body(closure.body)), . _ => { 33 ( 0.00%) self.allow_insert_closure &= !self.in_tail_pos; 44 ( 0.00%) self.allow_insert_closure &= 44 ( 0.00%) can_move_expr_to_closure_no_visit(self.cx, expr, &self.loops, &self.locals); 476 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::can_move_expr_to_closure_no_visit (11x) . // Sub expressions are no longer in the tail position. . self.is_single_insert = false; 11 ( 0.00%) self.in_tail_pos = false; 33 ( 0.00%) walk_expr(self, expr); 22,374 ( 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 (9x) 16,473 ( 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:: (2x) . }, . }, . } 128 ( 0.00%) } . . fn visit_pat(&mut self, p: &'tcx Pat<'tcx>) { . p.each_binding_or_first(&mut |_, id, _, _| { . self.locals.insert(id); . }); . } . } . -- line 595 ---------------------------------------- -- line 599 ---------------------------------------- . fn is_any_expr_in_map_used<'tcx>( . cx: &LateContext<'tcx>, . spanless_eq: &mut SpanlessEq<'_, 'tcx>, . ctxt: SyntaxContext, . map: &'tcx Expr<'tcx>, . expr: &'tcx Expr<'tcx>, . ) -> bool { . for_each_expr(cx.tcx, map, |e| { 235 ( 0.00%) if spanless_eq.eq_expr(ctxt, e, expr) { 563 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (2x) . return ControlFlow::Break(()); . } . ControlFlow::Continue(()) . }) . .is_some() . } . . struct InsertSearchResults<'tcx> { -- line 615 ---------------------------------------- -- line 714 ---------------------------------------- . }, . } . } . res.push_str(&snippet_with_applicability(cx, span, "..", app)); . res . } . } . 22 ( 0.00%) fn find_insert_calls<'tcx>( . cx: &LateContext<'tcx>, . contains_expr: &ContainsExpr<'tcx>, . expr: &'tcx Expr<'_>, . ) -> Option> { 50 ( 0.00%) let mut s = InsertSearcher { . cx, . map: contains_expr.map, . key: contains_expr.key, 2 ( 0.00%) ctxt: expr.span.ctxt(), . spanless_eq: SpanlessEq::new(cx), . allow_insert_closure: true, . can_use_entry: true, . in_tail_pos: true, . is_single_insert: true, . is_map_used: false, . is_key_used: false, . edits: Vec::new(), . loops: Vec::new(), . locals: HirIdSet::default(), . map_is_mutex_guard: false, . }; . // Check if the map is a non-async-aware `MutexGuard` 10 ( 0.00%) if let rustc_middle::ty::Adt(adt, _) = cx.typeck_results().expr_ty(contains_expr.map).kind() 80 ( 0.00%) => ???:::expr_ty (2x) 2 ( 0.00%) && is_mutex_guard(cx, adt.did()) . { . s.map_is_mutex_guard = true; . } . 4 ( 0.00%) s.visit_expr(expr); 20,932 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/entry.rs:::visit_expr (2x) 4 ( 0.00%) if !s.can_use_entry { . return None; . } . 12 ( 0.00%) let is_key_used_and_no_copy = s.is_key_used && !is_copy(cx, cx.typeck_results().expr_ty(contains_expr.key)); 202 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_copy (1x) 40 ( 0.00%) => ???:::expr_ty (1x) 6 ( 0.00%) Some(InsertSearchResults { 8 ( 0.00%) edits: s.edits, 2 ( 0.00%) allow_insert_closure: s.allow_insert_closure, 2 ( 0.00%) is_single_insert: s.is_single_insert, . is_key_used_and_no_copy, . }) 18 ( 0.00%) } . . fn is_mutex_guard(cx: &LateContext<'_>, def_id: DefId) -> bool { 20 ( 0.00%) match cx.tcx.get_diagnostic_name(def_id) { 174 ( 0.00%) => ???:::get_diagnostic_name (2x) . Some(name) => matches!(name, sym::MutexGuard | sym::RwLockReadGuard | sym::RwLockWriteGuard), . None => paths::PARKING_LOT_GUARDS.iter().any(|guard| guard.matches(cx, def_id)), . } . } 1,317 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/doc/lazy_continuation.rs -------------------------------------------------------------------------------- Ir -- line 18 ---------------------------------------- . pub(super) fn check( . cx: &LateContext<'_>, . doc: &str, . cooked_range: Range, . fragments: &Fragments<'_>, . containers: &[super::Container], . ) { . // Get blockquotes 1,164 ( 0.00%) let ccount = doc[cooked_range.clone()].chars().filter(|c| *c == '>').count(); . let blockquote_level = containers . .iter() . .filter(|c| matches!(c, super::Container::Blockquote)) . .count(); . 2,008 ( 0.00%) if ccount < blockquote_level . && let Some(mut span) = fragments.span(cx, cooked_range.clone()) . { . span_lint_and_then( . cx, . DOC_LAZY_CONTINUATION, . span, . "doc quote line without `>` marker", . |diag| { -- line 40 ---------------------------------------- -- line 64 ---------------------------------------- . Applicability::MachineApplicable, . ); . diag.help("if this not intended to be a quote at all, escape it with `\\>`"); . }, . ); . return; . } . 2,008 ( 0.00%) if ccount != 0 && blockquote_level != 0 { . // If this doc is a blockquote, we don't go further. . return; . } . . // List 2,168 ( 0.00%) let leading_spaces = doc[cooked_range.clone()].chars().filter(|c| *c == ' ').count(); . let list_indentation = containers . .iter() . .map(|c| { 2,064 ( 0.00%) if let super::Container::List(indent) = c { . *indent . } else { . 0 . } . }) . .sum(); . 2,008 ( 0.00%) if leading_spaces != list_indentation 893 ( 0.00%) && let Some(span) = fragments.span(cx, cooked_range.clone()) . { 2,679 ( 0.00%) if leading_spaces < list_indentation { 8,037 ( 0.00%) span_lint_and_then( 234,588,438 ( 6.46%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (893x) . cx, . DOC_LAZY_CONTINUATION, . span, . "doc list item without indentation", 5,358 ( 0.00%) |diag| { . // simpler suggestion style for indentation 2,679 ( 0.00%) let indent = list_indentation - leading_spaces; . diag.span_suggestion_verbose( 893 ( 0.00%) span.shrink_to_hi(), . "indent this line", 2,679 ( 0.00%) std::iter::repeat_n(" ", indent).join(""), 433,359 ( 0.01%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.15.0/src/lib.rs: as itertools::Itertools>::join (893x) . Applicability::MaybeIncorrect, . ); . diag.help("if this is supposed to be its own paragraph, add a blank line"); . }, . ); . . return; . } -- line 113 ---------------------------------------- 6,251 ( 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)] 18,180 ( 0.00%) pub(crate) fn check<'tcx>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'_>, . op: BinOpKind, . left: &'tcx Expr<'_>, . right: &'tcx Expr<'_>, . ) { 7,575 ( 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), 267 ( 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) . }, . }; 2,562 ( 0.00%) if let Some(trait_id) = trait_id { 13,015 ( 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 138 ---------------------------------------- . Applicability::MachineApplicable, . ); . }, . ); . } . }, . // foo == &bar . (_, &ExprKind::AddrOf(BorrowKind::Ref, _, r)) => { 4 ( 0.00%) let rty = cx.typeck_results().expr_ty(r); 80 ( 0.00%) => ???:::expr_ty (2x) 20 ( 0.00%) if let Some((self_ty, other_ty)) = in_impl(cx, e, trait_id) { 1,337 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/op_ref.rs:clippy_lints::operators::op_ref::in_impl (2x) . let lty = cx.typeck_results().expr_ty(left); . if (are_equal(cx, rty, self_ty) && are_equal(cx, lty, other_ty)) . || (are_equal(cx, rty, other_ty) && are_equal(cx, lty, self_ty)) . { . return; // Don't lint . } . } 6 ( 0.00%) let rcpy = is_copy(cx, rty); 15,263 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_copy (2x) 6 ( 0.00%) if (requires_ref || rcpy) 24 ( 0.00%) && implements_trait(cx, cx.typeck_results().expr_ty(left), trait_id, &[rty.into()]) 168,194 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (2x) 80 ( 0.00%) => ???:::expr_ty (2x) . { . span_lint_and_then(cx, OP_REF, e.span, "taken reference of right operand", |diag| { . let mut applicability = Applicability::MachineApplicable; . let (rsnip, _) = snippet_with_context(cx, r.span, e.span.ctxt(), "...", &mut applicability); . diag.span_suggestion( . right.span, . "use the right value directly", . rsnip, -- line 165 ---------------------------------------- -- line 166 ---------------------------------------- . Applicability::MachineApplicable, . ); . }); . } . }, . _ => {}, . } . } 12,120 ( 0.00%) } . 16 ( 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>)> { 6 ( 0.00%) if let Some(block) = get_enclosing_block(cx, e.hir_id) 958 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_enclosing_block (2x) 16 ( 0.00%) && let Some(impl_def_id) = cx.tcx.impl_of_assoc(block.hir_id.owner.to_def_id()) 253 ( 0.00%) => ???:::impl_of_assoc (2x) 5 ( 0.00%) && let item = cx.tcx.hir_expect_item(impl_def_id.expect_local()) 61 ( 0.00%) => ???:::hir_expect_item (1x) 2 ( 0.00%) && let ItemKind::Impl(item) = &item.kind 3 ( 0.00%) && let Some(of_trait) = &item.of_trait . && let Some(seg) = of_trait.trait_ref.path.segments.last() . && let Res::Def(_, trait_id) = seg.res . && trait_id == bin_op . && let Some(generic_args) = seg.args . && let Some(GenericArg::Type(other_ty)) = generic_args.args.last() . { . // `_` is not permitted in impl headers . Some((item.self_ty, other_ty.as_unambig_ty())) . } else { . None . } 14 ( 0.00%) } . . fn are_equal(cx: &LateContext<'_>, middle_ty: Ty<'_>, hir_ty: &rustc_hir::Ty<'_>) -> bool { . if let ty::Adt(adt_def, _) = middle_ty.kind() . && let Some(local_did) = adt_def.did().as_local() . && let item = cx.tcx.hir_expect_item(local_did) . && let middle_ty_id = item.owner_id.to_def_id() . && let TyKind::Path(QPath::Resolved(_, path)) = hir_ty.kind . && let Res::Def(_, hir_ty_id) = path.res -- line 205 ---------------------------------------- 12,730 ( 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; . 76,552 ( 0.00%) pub(super) fn check(cx: &EarlyContext<'_>, pat: &Pat) { 19,138 ( 0.00%) if let PatKind::Struct(_, ref npat, ref pfields, _) = pat.kind { . let mut wilds = 0; 706 ( 0.00%) let type_name = npat . .segments . .last() . .expect("A path must have at least one segment") . .ident . .name; . 1,156 ( 0.00%) for field in pfields { 2,145 ( 0.00%) if let PatKind::Wild = field.pat.kind { . wilds += 1; . } . } 289 ( 0.00%) if !pfields.is_empty() && wilds == pfields.len() { . if !pat.span.in_external_macro(cx.sess().source_map()) { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then( . cx, . UNNEEDED_FIELD_PATTERN, . pat.span, . "all the struct fields are matched to a wildcard pattern, consider using `..`", . |diag| { . diag.help(format!("try with `{type_name} {{ .. }}` instead")); . }, . ); . } . return; . } 578 ( 0.00%) if wilds > 0 { . for field in pfields { . if let PatKind::Wild = field.pat.kind . && !field.span.in_external_macro(cx.sess().source_map()) . { . wilds -= 1; . if wilds > 0 { . span_lint( . cx, -- line 47 ---------------------------------------- -- line 69 ---------------------------------------- . )); . }, . ); . } . } . } . } . } 76,552 ( 0.00%) } 353 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/chain.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . // . // Only the "first" iterator is actually set `None` when exhausted, depending on whether you . // iterate forward or backward. If you mix directions, then both sides may be `None`. . a: Option, . b: Option, . } . impl Chain { . pub(in super::super) const fn new(a: A, b: B) -> Chain { 26,290 ( 0.00%) Chain { a: Some(a), b: Some(b) } . } . } . . /// Converts the arguments to iterators and links them together, in a chain. . /// . /// See the documentation of [`Iterator::chain`] for more. . /// . /// # Examples -- line 45 ---------------------------------------- -- line 73 ---------------------------------------- . impl Iterator for Chain . where . A: Iterator, . B: Iterator, . { . type Item = A::Item; . . #[inline] 1,533 ( 0.00%) fn next(&mut self) -> Option { 3,042 ( 0.00%) and_then_or_clear(&mut self.a, Iterator::next).or_else(|| self.b.as_mut()?.next()) 1,905 ( 0.00%) } . . #[inline] . #[rustc_inherit_overflow_checks] . fn count(self) -> usize { . let a_count = match self.a { . Some(a) => a.count(), . None => 0, . }; . let b_count = match self.b { . Some(b) => b.count(), . None => 0, . }; . a_count + b_count . } . 6,792 ( 0.00%) fn try_fold(&mut self, mut acc: Acc, mut f: F) -> R . where . Self: Sized, . F: FnMut(Acc, Self::Item) -> R, . R: Try, . { 2,496 ( 0.00%) if let Some(ref mut a) = self.a { 8 ( 0.00%) acc = a.try_fold(acc, &mut f)?; 10 ( 0.00%) self.a = None; . } 10 ( 0.00%) if let Some(ref mut b) = self.b { 20 ( 0.00%) acc = b.try_fold(acc, f)?; . // we don't fuse the second iterator . } . try { acc } 8,286 ( 0.00%) } . 16 ( 0.00%) fn fold(self, mut acc: Acc, mut f: F) -> Acc . where . F: FnMut(Acc, Self::Item) -> Acc, . { 6,170 ( 0.00%) if let Some(a) = self.a { . acc = a.fold(acc, &mut f); . } 2,571 ( 0.00%) if let Some(b) = self.b { . acc = b.fold(acc, f); . } . acc 18 ( 0.00%) } . . #[inline] . fn advance_by(&mut self, mut n: usize) -> Result<(), NonZero> { . if let Some(ref mut a) = self.a { . n = match a.advance_by(n) { . Ok(()) => return Ok(()), . Err(k) => k.get(), . }; -- line 135 ---------------------------------------- -- line 175 ---------------------------------------- . // Must exhaust a before b. . let a_last = self.a.and_then(Iterator::last); . let b_last = self.b.and_then(Iterator::last); . b_last.or(a_last) . } . . #[inline] . fn size_hint(&self) -> (usize, Option) { 25,035 ( 0.00%) match self { . Chain { a: Some(a), b: Some(b) } => { . let (a_lower, a_upper) = a.size_hint(); 2,570 ( 0.00%) let (b_lower, b_upper) = b.size_hint(); . . let lower = a_lower.saturating_add(b_lower); . . let upper = match (a_upper, b_upper) { . (Some(x), Some(y)) => x.checked_add(y), . _ => None, . }; . -- line 194 ---------------------------------------- -- line 325 ---------------------------------------- . fn default() -> Self { . Chain::new(Default::default(), Default::default()) . } . } . . #[inline] . fn and_then_or_clear(opt: &mut Option, f: impl FnOnce(&mut T) -> Option) -> Option { . let x = f(opt.as_mut()?); 8,593 ( 0.00%) if x.is_none() { 10,522 ( 0.00%) *opt = None; . } . x . } 40,399 ( 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(); . 233,561 ( 0.01%) if start > end || end > slice.len() { . return false; . } . 126,056 ( 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 { 158,403 ( 0.00%) (start == 0 || bytes.as_ptr().add(start).read().is_utf8_char_boundary()) 107,096 ( 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 { 151,747 ( 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> { 63,196 ( 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 { 2,050 ( 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> { 2,625 ( 0.00%) if slice.is_char_boundary(self.end) { . // SAFETY: just checked that `end` is on a char boundary, . // and we are passing in a safe reference, so the return value will also be one. . Some(unsafe { &*self.get_unchecked(slice) }) . } else { . None . } . } . #[inline] -- line 432 ---------------------------------------- -- line 447 ---------------------------------------- . #[inline] . unsafe fn get_unchecked_mut(self, slice: *mut str) -> *mut Self::Output { . // SAFETY: the caller has to uphold the safety contract for `get_unchecked_mut`. . unsafe { (0..self.end).get_unchecked_mut(slice) } . } . #[inline] . fn index(self, slice: &str) -> &Self::Output { . let end = self.end; 909 ( 0.00%) match self.get(slice) { . Some(s) => s, . None => super::slice_error_fail(slice, 0, end), . } . } . #[inline] . fn index_mut(self, slice: &mut str) -> &mut Self::Output { . if slice.is_char_boundary(self.end) { . // SAFETY: just checked that `end` is on a char boundary, -- line 463 ---------------------------------------- -- line 485 ---------------------------------------- . /// Panics if `begin` does not point to the starting byte offset of . /// a character (as defined by `is_char_boundary`), or if `begin > len`. . #[stable(feature = "str_checked_slicing", since = "1.20.0")] . #[rustc_const_unstable(feature = "const_index", issue = "143775")] . const unsafe impl SliceIndex for ops::RangeFrom { . type Output = str; . #[inline] . fn get(self, slice: &str) -> Option<&Self::Output> { 138 ( 0.00%) if slice.is_char_boundary(self.start) { . // SAFETY: just checked that `start` is on a char boundary, . // and we are passing in a safe reference, so the return value will also be one. . Some(unsafe { &*self.get_unchecked(slice) }) . } else { . None . } . } . #[inline] -- line 501 ---------------------------------------- 282,884 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/str/mod.rs -------------------------------------------------------------------------------- Ir -- line 167 ---------------------------------------- . /// assert!(!s.is_empty()); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_str_is_empty", since = "1.39.0")] . #[rustc_no_implicit_autorefs] . #[must_use] . #[inline] . pub const fn is_empty(&self) -> bool { 103,493 ( 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. 7,941 ( 0.00%) if index == 0 { . return true; . } . 12,870 ( 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. 8 ( 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()] 2,212 ( 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)), 606 ( 0.00%) from_utf8_unchecked(slice::from_raw_parts(ptr.add(mid), len - mid)), . ) . } . } . . /// Divides one string slice into two at an index. . /// . /// # Safety . /// -- line 1013 ---------------------------------------- -- line 1071 ---------------------------------------- . /// assert_eq!(Some('\u{0306}'), chars.next()); . /// . /// assert_eq!(None, chars.next()); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . #[rustc_diagnostic_item = "str_chars"] . pub fn chars(&self) -> Chars<'_> { 10 ( 0.00%) Chars { iter: self.as_bytes().iter() } . } . . /// Returns an iterator over the [`char`]s of a string slice, and their . /// positions. . /// . /// As a string slice consists of valid UTF-8, we can iterate through a . /// string slice by [`char`]. This method returns an iterator of both . /// these [`char`]s, as well as their byte positions. -- line 1087 ---------------------------------------- -- line 1375 ---------------------------------------- . /// let bananas = "bananas"; . /// . /// assert!(bananas.contains("nana")); . /// assert!(!bananas.contains("apples")); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub fn contains(&self, pat: P) -> bool { 5,720 ( 0.00%) pat.is_contained_in(self) 12,040 ( 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:::is_contained_in (280x) . } . . /// 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 { 105,309 ( 0.00%) pat.into_searcher(self).next_match().map(|(i, _)| i) 6,170,639 ( 0.17%) => /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 (35,103x) . } . . /// 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> { 6,132 ( 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>, . { 12,258 ( 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] 6,440 ( 0.00%) pub fn split_once(&self, delimiter: P) -> Option<(&'_ str, &'_ str)> { 659 ( 0.00%) let (start, end) = delimiter.into_searcher(self).next_match()?; 33,320 ( 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 (280x) . // SAFETY: `Searcher` is known to return valid indices. 840 ( 0.00%) unsafe { Some((self.get_unchecked(..start), self.get_unchecked(end..))) } 4,200 ( 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 { 254,459 ( 0.01%) self.trim_matches(char::is_whitespace) 204 ( 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::<::is_whitespace> (4x) . } . . /// 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 { 19,799 ( 0.00%) self.trim_start_matches(char::is_whitespace) 3,252,860 ( 0.09%) => /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> (17,857x) . } . . /// 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 2257 ---------------------------------------- . /// assert!(Some('ת') == s.trim_end().chars().rev().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_end"] . pub fn trim_end(&self) -> &str { 121 ( 0.00%) self.trim_end_matches(char::is_whitespace) 135 ( 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::<::is_whitespace> (1x) . } . . /// Returns a string slice with leading whitespace removed. . /// . /// 'Whitespace' is defined according to the terms of the Unicode Derived . /// Core Property `White_Space`. . /// . /// # Text directionality -- line 2273 ---------------------------------------- -- 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")] 350,145 ( 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) } 350,145 ( 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")] 40,716 ( 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()) } 20,358 ( 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")] 331 ( 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) } 331 ( 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 { 18,698 ( 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 ---------------------------------------- 139,134 ( 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; . 23,032 ( 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 { 40,431 ( 0.00%) if let PatKind::Ident(_, ident, None) = arg.pat.kind { . let arg_name = ident.to_string(); . 32 ( 0.00%) if let Some(arg_name) = arg_name.strip_prefix('_') { . if let Some(correspondence) = registered_names.get(arg_name) { . span_lint( . cx, . DUPLICATE_UNDERSCORE_ARGUMENT, . *correspondence, . format!( . "`{arg_name}` already exists, having another argument having almost the same \ . name makes code comprehension and documentation more difficult" . ), . ); . } . } else { 22,285 ( 0.00%) registered_names.insert(arg_name, arg.pat.span); . } . } . } 23,032 ( 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; . 17,521 ( 0.00%) pub(super) fn check_impl_item(cx: &LateContext<'_>, item: &ImplItem<'_>, ignored_traits: &DefIdSet) { 5,011 ( 0.00%) if !item.span.from_expansion() 7,558 ( 0.00%) && let ImplItemKind::Fn(_, body_id) = item.kind 9,255 ( 0.00%) && let parent_node = cx.tcx.parent_hir_node(item.hir_id()) 233,535 ( 0.01%) => ???:::parent_hir_node (1,851x) 5,553 ( 0.00%) && let Node::Item(parent_item) = parent_node 5,553 ( 0.00%) && let ItemKind::Impl(Impl { . of_trait: Some(of_trait), . .. 1,851 ( 0.00%) }) = &parent_item.kind . && let Some(did) = cx.tcx.trait_item_of(item.owner_id) 1,041 ( 0.00%) && !is_from_ignored_trait(&of_trait.trait_ref, ignored_traits) . { 1,998 ( 0.00%) let mut param_idents_iter = cx.tcx.hir_body_param_idents(body_id); 22,827 ( 0.00%) => ???:::hir_body_param_idents (333x) . let mut default_param_idents_iter = cx.tcx.fn_arg_idents(did).iter().copied(); . 333 ( 0.00%) let renames = RenamedFnArgs::new(&mut default_param_idents_iter, &mut param_idents_iter); 90,778 ( 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}>> (333x) 333 ( 0.00%) if !renames.0.is_empty() { 20 ( 0.00%) let multi_span = renames.multi_span(); 550 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/functions/renamed_function_params.rs:::multi_span (5x) 35 ( 0.00%) let plural = if renames.0.len() == 1 { "" } else { "s" }; 35 ( 0.00%) span_lint_and_then( 6,197 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (5x) . cx, . RENAMED_FUNCTION_PARAMS, . multi_span, 15 ( 0.00%) format!("renamed function parameter{plural} of trait impl"), 25 ( 0.00%) |diag| { . diag.multipart_suggestion( . format!("consider using the default name{plural}"), . renames.0, . Applicability::Unspecified, . ); . }, . ); . } 328 ( 0.00%) } 6,232 ( 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::> (328x) 20,024 ( 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. 2,997 ( 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,136 ( 0.00%) if let Some(default_ident) = has_name_to_check(default_ident) . && let Some(current_ident) = has_name_to_check(current_ident) 566 ( 0.00%) && default_ident.name != current_ident.name . { . renamed.push((current_ident.span, default_ident.to_string())); . } . } . 2,331 ( 0.00%) Self(renamed) 2,664 ( 0.00%) } . 40 ( 0.00%) fn multi_span(&self) -> MultiSpan { . self.0 . .iter() . .map(|(span, _)| span) . .copied() . .collect::>() . .into() 30 ( 0.00%) } . } . . fn is_from_ignored_trait(of_trait: &TraitRef<'_>, ignored_traits: &DefIdSet) -> bool { . of_trait 347 ( 0.00%) .trait_def_id() 4,511 ( 0.00%) => ???:::trait_def_id (347x) . .is_some_and(|trait_did| ignored_traits.contains(&trait_did)) . } 5,381 ( 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; . 13,856 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, sig: &FnSig<'_>, body: Option<&Body<'tcx>>) { 6,743 ( 0.00%) let FnRetTy::Return(ty) = sig.decl.output else { return }; 262 ( 0.00%) for (out, mutability, out_span) in get_lifetimes(ty) { . if mutability != Some(Mutability::Mut) { . continue; . } 225 ( 0.00%) let out_region = cx.tcx.named_bound_var(out.hir_id); 317,171 ( 0.01%) => ???:::named_bound_var (45x) . // `None` if one of the types contains `&'a mut T` or `T<'a>`. . // Else, contains all the locations of `&'a T` types. 90 ( 0.00%) let args_immut_refs: Option> = sig . .decl . .inputs . .iter() . .flat_map(get_lifetimes) 225 ( 0.00%) .filter(|&(lt, _, _)| cx.tcx.named_bound_var(lt.hir_id) == out_region) 3,453 ( 0.00%) => ???:::named_bound_var (45x) . .map(|(_, mutability, span)| (mutability == Some(Mutability::Not)).then_some(span)) . .collect(); . if let Some(args_immut_refs) = args_immut_refs . && !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, -- line 32 ---------------------------------------- -- line 35 ---------------------------------------- . "mutable borrow from immutable input(s)", . |diag| { . let ms = MultiSpan::from_spans(args_immut_refs); . diag.span_note(ms, "immutable borrow here"); . }, . ); . } . } 13,856 ( 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>) { 6,002 ( 0.00%) if let TyKind::Ref(lt, ref m) = ty.kind { 463 ( 0.00%) self.result.push((lt, Some(m.mutbl), ty.span)); . } 5,665 ( 0.00%) hir::intravisit::walk_ty(self, ty); 3,522 ( 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:: (45x) . } . . fn visit_generic_arg(&mut self, generic_arg: &'tcx GenericArg<'tcx>) { 3,519 ( 0.00%) if let GenericArg::Lifetime(lt) = generic_arg { 196 ( 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 _; . 4,776 ( 0.00%) let mut visitor = LifetimeVisitor { result: Vec::new() }; . visitor.visit_ty_unambig(ty); 6,323 ( 0.00%) visitor.result . } 214 ( 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 124,850 ( 0.00%) let ExprKind::Closure(Closure { . kind: ClosureKind::Coroutine(CoroutineKind::Desugared(CoroutineDesugaring::Async, kind)), . body: body_id, . .. 279 ( 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, . ); . }, . ); . } 497,168 ( 0.01%) } . } -------------------------------------------------------------------------------- -- 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; . 12,120 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . op: BinOpKind, . lhs: &'tcx Expr<'_>, . rhs: &'tcx Expr<'_>, . ) { 4,545 ( 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); . } 12,120 ( 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 { 5,835 ( 0.00%) if let ExprKind::Cast(cast_exp, _) = expr.kind { 3 ( 0.00%) let precast_ty = cx.typeck_results().expr_ty(cast_exp); 40 ( 0.00%) => ???:::expr_ty (1x) 3 ( 0.00%) let cast_ty = cx.typeck_results().expr_ty(expr); 40 ( 0.00%) => ???:::expr_ty (1x) . 3 ( 0.00%) return is_isize_or_usize(precast_ty) != is_isize_or_usize(cast_ty); . } . . false . } . . fn detect_absurd_comparison<'tcx>( . cx: &LateContext<'tcx>, . op: BinOpKind, . lhs: &'tcx Expr<'_>, . rhs: &'tcx Expr<'_>, . ) -> Option<(ExtremeExpr<'tcx>, AbsurdComparisonResult)> { . use AbsurdComparisonResult::{AlwaysFalse, AlwaysTrue, InequalityImpossible}; . use ExtremeType::{Maximum, Minimum}; . // absurd comparison only makes sense on primitive types . // primitive types don't implement comparison operators with each other 16,665 ( 0.00%) if cx.typeck_results().expr_ty(lhs) != cx.typeck_results().expr_ty(rhs) { 121,364 ( 0.00%) => ???:::expr_ty (3,030x) . return None; . } . . // comparisons between fix sized types and target sized types are considered unanalyzable 1 ( 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)?; . 2,228 ( 0.00%) let lx = detect_extreme_expr(cx, normalized_lhs); 257,988 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/operators/absurd_extreme_comparisons.rs:clippy_lints::operators::absurd_extreme_comparisons::detect_extreme_expr (594x) 2,048 ( 0.00%) let rx = detect_extreme_expr(cx, normalized_rhs); 193,626 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/operators/absurd_extreme_comparisons.rs:clippy_lints::operators::absurd_extreme_comparisons::detect_extreme_expr (594x) . . Some(match rel { . Rel::Lt => { 1,260 ( 0.00%) match (lx, rx) { . (Some(l @ ExtremeExpr { which: Maximum, .. }), _) => (l, AlwaysFalse), // max < x . (_, Some(r @ ExtremeExpr { which: Minimum, .. })) => (r, AlwaysFalse), // x < min . _ => return None, . } . }, . Rel::Le => { 944 ( 0.00%) match (lx, rx) { . (Some(l @ ExtremeExpr { which: Minimum, .. }), _) => (l, AlwaysTrue), // min <= x . (Some(l @ ExtremeExpr { which: Maximum, .. }), _) => (l, InequalityImpossible), // max <= x . (_, Some(r @ ExtremeExpr { which: Minimum, .. })) => (r, InequalityImpossible), // x <= min . (_, Some(r @ ExtremeExpr { which: Maximum, .. })) => (r, AlwaysTrue), // x <= max . _ => return None, . } . }, . Rel::Ne | Rel::Eq => return None, . }) . } . 9,504 ( 0.00%) fn detect_extreme_expr<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option> { 2,376 ( 0.00%) let ty = cx.typeck_results().expr_ty(expr); 47,592 ( 0.00%) => ???:::expr_ty (1,188x) . 8,316 ( 0.00%) let cv = ConstEvalCtxt::new(cx).eval(expr)?; 279,308 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (1,188x) 66,528 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (1,188x) . 4,292 ( 0.00%) let which = match (ty.kind(), cv) { . (&ty::Bool, Constant::Bool(false)) | (&ty::Uint(_), Constant::Int(0)) => ExtremeType::Minimum, 100 ( 0.00%) (&ty::Int(ity), Constant::Int(i)) if i == unsext(cx.tcx, i128::MIN >> (128 - int_bits(cx.tcx, ity)), ity) => { 80 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::clip (4x) 36 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::int_bits (4x) . ExtremeType::Minimum . }, . . (&ty::Bool, Constant::Bool(true)) => ExtremeType::Maximum, 84 ( 0.00%) (&ty::Int(ity), Constant::Int(i)) if i == unsext(cx.tcx, i128::MAX >> (128 - int_bits(cx.tcx, ity)), ity) => { 80 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::clip (4x) 36 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::int_bits (4x) . ExtremeType::Maximum . }, 1,320 ( 0.00%) (&ty::Uint(uty), Constant::Int(i)) if clip(cx.tcx, u128::MAX, uty) == i => ExtremeType::Maximum, 3,509 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::clip (132x) . . _ => return None, . }; . Some(ExtremeExpr { which, expr }) 10,692 ( 0.00%) } 5,639 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/needless_question_mark.rs -------------------------------------------------------------------------------- Ir -- line 60 ---------------------------------------- . * Return statement . * A body's value (single line closure) . * . * What do we not match: . * Implicit calls to `from(..)` on the error value . */ . . fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { 127,841 ( 0.00%) if let ExprKind::Ret(Some(e)) = expr.kind { 3,471 ( 0.00%) check(cx, e); 118,027 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/needless_question_mark.rs:clippy_lints::needless_question_mark::check (1,157x) . } . } . . fn check_body(&mut self, cx: &LateContext<'_>, body: &'_ Body<'_>) { 13,380 ( 0.00%) if let ExprKind::Block( . Block { . expr: . Some(Expr { . kind: ExprKind::DropTemps(async_body), . .. . }), . .. . }, . _, 10,784 ( 0.00%) ) = body.value.kind . { 54 ( 0.00%) 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<'_>) { 13,273 ( 0.00%) if let ExprKind::Call(path, [arg]) = expr.kind 7,424 ( 0.00%) && let Res::Def(DefKind::Ctor(..), ctor_id) = path.res(cx) . && let Some(variant_id) = cx.tcx.opt_parent(ctor_id) 2,478 ( 0.00%) && let variant = if cx.tcx.lang_items().option_some_variant() == Some(variant_id) { 29,760 ( 0.00%) => ???:::lang_items (744x) . "Some" 1,647 ( 0.00%) } else if cx.tcx.lang_items().result_ok_variant() == Some(variant_id) { 25,920 ( 0.00%) => ???:::lang_items (648x) . "Ok" . } else { . return; . } 898 ( 0.00%) && 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) . && expr.span.eq_ctxt(inner_expr.span) . && let expr_ty = cx.typeck_results().expr_ty(expr) . && let inner_ty = cx.typeck_results().expr_ty(inner_expr) . && expr_ty == inner_ty . { -- line 114 ---------------------------------------- -- line 128 ---------------------------------------- . String::new(), . ), . ], . Applicability::MachineApplicable, . ); . }, . ); . } 4,093 ( 0.00%) } 15,453 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/assertions_on_constants.rs -------------------------------------------------------------------------------- Ir -- line 39 ---------------------------------------- . } . impl AssertionsOnConstants { . pub fn new(conf: &Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for AssertionsOnConstants { 621,460 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 3,577 ( 0.00%) if let Some(macro_call) = root_macro_call_first_node(cx, e) 3,890 ( 0.00%) && let is_debug = match cx.tcx.get_diagnostic_name(macro_call.def_id) { 43,226 ( 0.00%) => ???:::get_diagnostic_name (511x) . Some(sym::debug_assert_macro) => true, . Some(sym::assert_macro) => false, . _ => return, . } 588 ( 0.00%) && let Some((condition, _)) = find_assert_args(cx, e, macro_call.expn) 124,738 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::find_assert_args (84x) . // 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`). 420 ( 0.00%) && is_const_evaluatable(cx.tcx, cx.typeck_results(), condition) 74,253 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::is_const_evaluatable (84x) 5 ( 0.00%) && let Some((Constant::Bool(assert_val), const_src)) = 10 ( 0.00%) ConstEvalCtxt::new(cx).eval_with_source(condition, macro_call.span.ctxt()) 1,442 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_with_source (1x) 56 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (1x) 4 ( 0.00%) && let in_const_context = is_inside_always_const_context(cx.tcx, e.hir_id) 580 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_inside_always_const_context (1x) 2 ( 0.00%) && (const_src.is_local() || !in_const_context) 2 ( 0.00%) && !(is_debug && as_bool_lit(condition) == Some(false)) . { 2 ( 0.00%) let (msg, help) = if !const_src.is_local() { 7 ( 0.00%) let help = if self.msrv.meets(cx, msrvs::CONST_BLOCKS) { 27 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (1x) . "consider moving this into a const block: `const { assert!(..) }`" 6 ( 0.00%) } else if self.msrv.meets(cx, msrvs::CONST_PANIC) { 27 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (1x) . "consider moving this to an anonymous constant: `const _: () = { assert!(..); }`" . } else { . return; . }; . ("this assertion has a constant value", help) . } else if assert_val { . ("this assertion is always `true`", "remove the assertion") . } else { . ( . "this assertion is always `false`", . "replace this with `panic!()` or `unreachable!()`", . ) . }; . 2 ( 0.00%) span_lint_and_help(cx, ASSERTIONS_ON_CONSTANTS, macro_call.span, msg, None, help); . } 497,168 ( 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 ---------------------------------------- 1,281 ( 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/avx2.rs -------------------------------------------------------------------------------- Ir -- line 691 ---------------------------------------- . /// . /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_cmpeq_epi8) . #[inline] . #[target_feature(enable = "avx2")] . #[cfg_attr(test, assert_instr(vpcmpeqb))] . #[stable(feature = "simd_x86", since = "1.27.0")] . #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] . pub const fn _mm256_cmpeq_epi8(a: __m256i, b: __m256i) -> __m256i { 3,060 ( 0.00%) unsafe { transmute::(simd_eq(a.as_i8x32(), b.as_i8x32())) } . } . . /// Compares packed 64-bit integers in `a` and `b` for greater-than. . /// . /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_cmpgt_epi64) . #[inline] . #[target_feature(enable = "avx2")] . #[cfg_attr(test, assert_instr(vpcmpgtq))] -- line 707 ---------------------------------------- -- line 2155 ---------------------------------------- . #[target_feature(enable = "avx2")] . #[cfg_attr(test, assert_instr(vpmovmskb))] . #[stable(feature = "simd_x86", since = "1.27.0")] . #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] . pub const fn _mm256_movemask_epi8(a: __m256i) -> i32 { . unsafe { . let z = i8x32::ZERO; . let m: i8x32 = simd_lt(a.as_i8x32(), z); 87,615 ( 0.00%) simd_bitmask::<_, u32>(m) as i32 . } . } . . /// Computes the sum of absolute differences (SADs) of quadruplets of unsigned . /// 8-bit integers in `a` compared to those in `b`, and stores the 16-bit . /// results in dst. Eight SADs are performed for each 128-bit lane using one . /// quadruplet from `b` and eight quadruplets from `a`. One quadruplet is . /// selected from `b` starting at on the offset specified in `imm8`. Eight -- line 2171 ---------------------------------------- -- line 2307 ---------------------------------------- . /// . /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_or_si256) . #[inline] . #[target_feature(enable = "avx2")] . #[cfg_attr(test, assert_instr(vorps))] . #[stable(feature = "simd_x86", since = "1.27.0")] . #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] . pub const fn _mm256_or_si256(a: __m256i, b: __m256i) -> __m256i { 2,295 ( 0.00%) unsafe { transmute(simd_or(a.as_i32x8(), b.as_i32x8())) } . } . . /// Converts packed signed 16-bit integers from `a` and `b` to packed 8-bit integers . /// using signed saturation . /// . /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_packs_epi16) . #[inline] . #[target_feature(enable = "avx2")] -- line 2323 ---------------------------------------- -------------------------------------------------------------------------------- -- 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; . 13,349 ( 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 11,484 ( 0.00%) if !impl_implements_trait && cx.effective_visibilities.is_exported(impl_item.owner_id.def_id) 80,868 ( 0.00%) => ???:::is_exported (1,534x) . // check missing trait implementations . && let Some(method_config) = TRAIT_METHODS.iter().find(|case| case.method_name == impl_item.ident.name) 10 ( 0.00%) && sig.decl.inputs.len() == method_config.param_count 8 ( 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 . && first_arg_ty_opt . .is_none_or(|first_arg_ty| method_config.self_kind.matches(cx, self_ty, first_arg_ty)) . && sig.header.is_safe() . && matches!(sig.header.constness, hir::Constness::NotConst) . && !sig.header.is_async() . && sig.header.abi == ExternAbi::Rust -- line 34 ---------------------------------------- -- line 45 ---------------------------------------- . ), . None, . format!( . "consider implementing the trait `{}` or choosing a less ambiguous method name", . method_config.trait_name . ), . ); . } 15,256 ( 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 139 ---------------------------------------- . Bool, . Any, . Ref, . } . . impl OutType { . fn matches(self, ty: &FnRetTy<'_>) -> bool { . let is_unit = |ty: &hir::Ty<'_>| matches!(ty.kind, hir::TyKind::Tup(&[])); 10 ( 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, 2 ( 0.00%) (Self::Ref, &FnRetTy::Return(ty)) => matches!(ty.kind, hir::TyKind::Ref(_, _)), . _ => false, . } . } . } 8,418 ( 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 128,006 ( 0.00%) if let ExprKind::If(cond, then, r#else) = expr.kind 2,476 ( 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. 36 ( 0.00%) && is_unsigned_integer(cx, divisor) . && let Some(block) = branch_block(then, r#else, branch) . { . let mut eq = SpanlessEq::new(cx).deny_side_effects().paths_by_resolution(); 140 ( 0.00%) if !eq.eq_expr(SyntaxContext::root(), divisor, divisor) { 26,600 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (20x) . return; . } . . let mut division_spans = Vec::new(); 19 ( 0.00%) let mut first_use = None; . 209 ( 0.00%) let found_early_use = for_each_expr_without_closures(block, |e| { 63,518 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_expr_without_closures::<(), clippy_utils::visitors::Descend, &rustc_hir::hir::Block, ::check_expr::{closure#0}> (19x) 1,043 ( 0.00%) if let ExprKind::Binary(binop, lhs, rhs) = e.kind 11 ( 0.00%) && binop.node == BinOpKind::Div 6 ( 0.00%) && eq.eq_expr(SyntaxContext::root(), rhs, divisor) 728 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (1x) . && is_unsigned_integer(cx, lhs) . { . match first_use { . None => first_use = Some(UseKind::Division), . Some(UseKind::Other) => return ControlFlow::Break(()), . Some(UseKind::Division) => {}, . } . -- line 82 ---------------------------------------- -- line 92 ---------------------------------------- . None => first_use = Some(UseKind::Division), . Some(UseKind::Other) => return ControlFlow::Break(()), . Some(UseKind::Division) => {}, . } . . division_spans.push(e.span); . . ControlFlow::<(), _>::Continue(Descend::No) 1,253 ( 0.00%) } else if eq.eq_expr(SyntaxContext::root(), e, divisor) { 5,830 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (20x) 14 ( 0.00%) if first_use.is_none() { 14 ( 0.00%) first_use = Some(UseKind::Other); . return ControlFlow::Break(()); . } . ControlFlow::<(), _>::Continue(Descend::Yes) . } else { . ControlFlow::<(), _>::Continue(Descend::Yes) . } . }); . 38 ( 0.00%) if found_early_use.is_some() || first_use != Some(UseKind::Division) || division_spans.is_empty() { . return; . } . . span_lint_and_then(cx, MANUAL_CHECKED_OPS, cond.span, "manual checked division", |diag| { . diag.span_label(cond.span, "check performed here"); . if let Some((first, rest)) = division_spans.split_first() { . 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`"); . }); 20 ( 0.00%) } 497,168 ( 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,430 ( 0.00%) let ExprKind::Binary(binop, lhs, rhs) = cond.kind else { . return None; . }; . 2,085 ( 0.00%) match binop.node { . BinOpKind::Ne | BinOpKind::Lt if is_zero(lhs) => Some((rhs, NonZeroBranch::Then)), 33 ( 0.00%) BinOpKind::Ne | BinOpKind::Gt if is_zero(rhs) => Some((lhs, NonZeroBranch::Then)), . BinOpKind::Eq if is_zero(lhs) => Some((rhs, NonZeroBranch::Else)), 36 ( 0.00%) BinOpKind::Eq if is_zero(rhs) => Some((lhs, NonZeroBranch::Else)), . _ => None, . } . } . . fn branch_block<'tcx>( . then: &'tcx Expr<'tcx>, . r#else: Option<&'tcx Expr<'tcx>>, . branch: NonZeroBranch, . ) -> Option<&'tcx Block<'tcx>> { 68 ( 0.00%) match branch { 34 ( 0.00%) NonZeroBranch::Then => match then.kind { . ExprKind::Block(block, _) => Some(block), . _ => None, . }, 13 ( 0.00%) NonZeroBranch::Else => match r#else?.kind { . ExprKind::Block(block, _) => Some(block), . _ => None, . }, . } . } . . fn is_zero(expr: &Expr<'_>) -> bool { . is_integer_literal(expr, 0) . } . . fn is_unsigned_integer(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 180 ( 0.00%) matches!(cx.typeck_results().expr_ty(expr).peel_refs().kind(), ty::Uint(_)) 1,440 ( 0.00%) => ???:::expr_ty (36x) . } 1,067 ( 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<'_>) { 62,146 ( 0.00%) if let ExprKind::Binary(ref op, left, right) = e.kind 1,690 ( 0.00%) && BinOpKind::Mul == op.node . { 595 ( 0.00%) match (&left.kind, &right.kind) { . (&ExprKind::Unary(..), &ExprKind::Unary(..)) => {}, . (&ExprKind::Unary(UnOp::Neg, lit), _) => check_mul(cx, e, lit, right), . (_, &ExprKind::Unary(UnOp::Neg, lit)) => check_mul(cx, e, lit, left), . _ => {}, . } . } . } . } -- line 62 ---------------------------------------- 238 ( 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 { 22,726 ( 0.00%) fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'tcx>) { . let_unit_value::check(cx, &self.format_args, local); 16,528 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 186,438 ( 0.01%) unit_cmp::check(cx, expr); 15,679,943 ( 0.43%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_cmp.rs:clippy_lints::unit_types::unit_cmp::check (62,146x) 186,438 ( 0.01%) unit_arg::check(cx, expr); 9,128,341 ( 0.25%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/unit_types/unit_arg.rs:clippy_lints::unit_types::unit_arg::check (62,146x) . } . } -------------------------------------------------------------------------------- -- 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 { 18,004 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 7,324 ( 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 2,180 ( 0.00%) && (1..=5).contains(&impl_.items.len()) . && let Some(of_trait) = impl_.of_trait 3,490 ( 0.00%) && let Some(trait_did) = of_trait.trait_ref.trait_def_id() 9,074 ( 0.00%) => ???:::trait_def_id (698x) . // Check this early to hopefully bail out as soon as possible 340 ( 0.00%) && let trait_ = if Some(trait_did) == self.clone_trait { . Trait::Clone 9 ( 0.00%) } else if Some(trait_did) == self.partial_ord_trait { . Trait::PartialOrd . } else { . return; . } 1,432 ( 0.00%) && !cx.tcx.is_automatically_derived(item.owner_id.to_def_id()) 25,028 ( 0.00%) => ???:::is_automatically_derived (179x) . { . 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 174 ---------------------------------------- . && !block.span.in_external_macro(cx.sess().source_map()) . { . Some((assoc, body, block)) . } else { . None . } . }); . 3 ( 0.00%) let trait_impl = cx.tcx.impl_trait_ref(item.owner_id).skip_binder(); 71 ( 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:: (1x) . 2 ( 0.00%) match trait_ { . Trait::Clone => { 4 ( 0.00%) if let Some(copy_trait) = self.copy_trait 10 ( 0.00%) && implements_trait(cx, trait_impl.self_ty(), copy_trait, &[]) 1,073 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (1x) . { . for (assoc, body, _) in assoc_fns { . check_clone_on_copy(cx, assoc, body.value); . } . } . }, . Trait::PartialOrd => { . // If `Self` and `Rhs` are not the same type, then a corresponding `Ord` impl is not possible, -- line 195 ---------------------------------------- -- 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); . } . }, . } . } 20,576 ( 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 ---------------------------------------- 5,239 ( 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] 40,059 ( 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(); . } 32,208 ( 0.00%) emit_lint_base_impl( 23,513 ( 0.00%) => ???:rustc_middle::lint::emit_lint_base::emit_lint_base_impl (71x) . sess, . lint, . level_spec.into(), 24,156 ( 0.00%) span, 19,459 ( 0.00%) Box::new(move |dcx, level| decorate.into_diag(dcx, level)), 11,536 ( 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 (3x) 90 ( 0.00%) => ???:0x0000000000173dc0 (3x) . ); 23,439 ( 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<'_>) { 191 ( 0.00%) if let Some(else_) = expr_block(else_block) 258 ( 0.00%) && !else_.span.from_expansion() 242 ( 0.00%) && let ExprKind::If(else_if_cond, ..) = else_.kind 22 ( 0.00%) && self.check_significant_tokens_and_expect_attrs(cx, else_block, else_, sym::collapsible_else_if) 3,093 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/collapsible_if.rs:::check_significant_tokens_and_expect_attrs (2x) . { . span_lint_hir_and_then( . cx, 2 ( 0.00%) COLLAPSIBLE_ELSE_IF, 2 ( 0.00%) else_.hir_id, . else_block.span, . "this `else { if .. }` block can be collapsed", . |diag| { . let up_to_else = then_span.between(else_block.span); . let else_before_if = else_.span.shrink_to_lo().with_hi(else_if_cond.span.lo() - BytePos(1)); . if self.lint_commented_code . && let Some(else_keyword_span) = span_extract_keyword(cx, up_to_else, "else") . && let Some(else_if_keyword_span) = span_extract_keyword(cx, else_before_if, "if") -- line 114 ---------------------------------------- -- line 160 ---------------------------------------- . ), . applicability, . ); . }, . ); . } . } . 5,280 ( 0.00%) fn check_collapsible_if_if(&self, cx: &LateContext<'_>, expr: &Expr<'_>, check: &Expr<'_>, then: &Block<'_>) { 84 ( 0.00%) if let Some(inner) = expr_block(then) 1,634 ( 0.00%) && let ExprKind::If(check_inner, _, None) = &inner.kind 20 ( 0.00%) && self.eligible_condition(cx, check_inner) 20 ( 0.00%) && expr.span.eq_ctxt(inner.span) 220 ( 0.00%) && self.check_significant_tokens_and_expect_attrs(cx, then, inner, sym::collapsible_if) 28,036 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/collapsible_if.rs:::check_significant_tokens_and_expect_attrs (20x) 20 ( 0.00%) && let then_closing_bracket = { . let end = then.span.shrink_to_hi(); . end.with_lo(end.lo() - BytePos(1)) . } 160 ( 0.00%) && !span_contains_cfg(cx, inner.span.between(then_closing_bracket)) 11,304 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::span_contains_cfg (20x) 3,940 ( 0.00%) => ???:::between (20x) . { . span_lint_hir_and_then( . cx, 40 ( 0.00%) COLLAPSIBLE_IF, 40 ( 0.00%) inner.hir_id, . expr.span, . "this `if` statement can be collapsed", 20 ( 0.00%) |diag| { 180 ( 0.00%) let then_open_bracket = then.span.split_at(1).0.with_leading_whitespace(cx).into_span(); 4,820 ( 0.00%) => ???:::split_at (20x) 320 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs: as clippy_utils::source::IntoSpan>::into_span (20x) 100 ( 0.00%) let then_closing_bracket = then_closing_bracket.with_leading_whitespace(cx).into_span(); 320 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs: as clippy_utils::source::IntoSpan>::into_span (20x) 160 ( 0.00%) let (paren_start, inner_if_span, paren_end) = peel_parens(cx, inner.span); 17,560 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/collapsible_if.rs:clippy_lints::collapsible_if::peel_parens (20x) 60 ( 0.00%) let inner_if = inner_if_span.split_at(2).0; 4,820 ( 0.00%) => ???:::split_at (20x) 240 ( 0.00%) let mut sugg = vec![ . // Remove the outer then block `{` . (then_open_bracket, String::new()), . // Remove the outer then block '}' . (then_closing_bracket, String::new()), . // Replace inner `if` by `&&` . (inner_if, String::from("&&")), . ]; . 20 ( 0.00%) if !paren_start.is_empty() { . // Remove any leading parentheses '(' . sugg.push((paren_start, String::new())); . } . 40 ( 0.00%) if !paren_end.is_empty() { . // Remove any trailing parentheses ')' . sugg.push((paren_end, String::new())); . } . 20 ( 0.00%) sugg.extend(parens_around(check)); 562 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/collapsible_if.rs:clippy_lints::collapsible_if::parens_around (20x) 20 ( 0.00%) sugg.extend(parens_around(check_inner)); 748 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/collapsible_if.rs:clippy_lints::collapsible_if::parens_around (20x) . 80 ( 0.00%) diag.multipart_suggestion("collapse nested if block", sugg, Applicability::MachineApplicable); . }, . ); . } 5,280 ( 0.00%) } . . fn eligible_condition(&self, cx: &LateContext<'_>, cond: &Expr<'_>) -> bool { 2,110 ( 0.00%) !matches!(cond.kind, ExprKind::Let(..)) || can_use_if_let_chains(cx, self.msrv) 450 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::can_use_if_let_chains (75x) . } . . // Check that nothing significant can be found between the initial `{` of `inner_if` and . // the beginning of `inner_if_expr`... . // . // Unless it's only an `#[expect(clippy::collapsible{,_else}_if)]` attribute, in which case we . // _do_ need to lint, in order to actually fulfill its expectation (#13365) 264 ( 0.00%) fn check_significant_tokens_and_expect_attrs( . &self, . cx: &LateContext<'_>, . inner_if: &Block<'_>, . inner_if_expr: &Expr<'_>, . expected_lint_name: Symbol, . ) -> bool { 88 ( 0.00%) match cx.tcx.hir_attrs(inner_if_expr.hir_id) { 1,389 ( 0.00%) => ???:::hir_attrs (22x) 88 ( 0.00%) [] => { . // There aren't any attributes, so just check for significant tokens 132 ( 0.00%) let span = inner_if.span.split_at(1).1.until(inner_if_expr.span); 5,302 ( 0.00%) => ???:::split_at (22x) 4,224 ( 0.00%) => ???:::until (22x) 22 ( 0.00%) !span_contains_non_whitespace(cx, span, self.lint_commented_code) . }, . . [attr] . if matches!(Level::from_opt_symbol(attr.name()), Some(Level::Expect)) . && let Some(metas) = attr.meta_item_list() . && let Some(MetaItemInner::MetaItem(meta_item)) = metas.first() . && let [tool, lint_name] = meta_item.path.segments.as_slice() . && tool.ident.name == sym::clippy -- line 247 ---------------------------------------- -- line 252 ---------------------------------------- . let span_after_attr = attr.span().between(inner_if_expr.span); . !span_contains_non_whitespace(cx, span_before_attr, self.lint_commented_code) . && !span_contains_non_whitespace(cx, span_after_attr, self.lint_commented_code) . }, . . // There are other attributes, which are significant tokens -- check failed . _ => false, . } 198 ( 0.00%) } . } . . impl LateLintPass<'_> for CollapsibleIf { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 124,292 ( 0.00%) if let ExprKind::If(cond, then, else_) = &expr.kind 2,476 ( 0.00%) && !expr.span.from_expansion() . { 3,045 ( 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) 293 ( 0.00%) && !(single_inner_if_else(then) && single_inner_if_else(else_)) 1,075 ( 0.00%) && let ExprKind::Block(else_, None) = else_.kind . { 173 ( 0.00%) self.check_collapsible_else_if(cx, then.span, else_); . } else if else_.is_none() 1,620 ( 0.00%) && self.eligible_condition(cx, cond) 3,960 ( 0.00%) && let ExprKind::Block(then, None) = then.kind . { 9,240 ( 0.00%) self.check_collapsible_if_if(cx, expr, cond, then); 9,146,979 ( 0.25%) => site/frontend/rust-clippy/clippy_lints/src/collapsible_if.rs:::check_collapsible_if_if (660x) . } . } 491,888 ( 0.01%) } . } . . /// Returns true if `expr` is a block that contains only one `if {..} else {}` statement . fn single_inner_if_else(expr: &Expr<'_>) -> bool { 1,423 ( 0.00%) if let ExprKind::Block(block, None) = expr.kind 308 ( 0.00%) && let Some(inner_expr) = expr_block(block) 428 ( 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>> { 3,492 ( 0.00%) match (block.stmts, block.expr) { 3,204 ( 0.00%) ([], expr) => expr, 1,784 ( 0.00%) ([stmt], None) if let StmtKind::Semi(expr) = stmt.kind => Some(expr), . _ => None, . } . } . . /// If the expression is a `||`, suggest parentheses around it. 320 ( 0.00%) pub(super) fn parens_around(expr: &Expr<'_>) -> Vec<(Span, String)> { . if let ExprKind::Binary(op, _, _) = expr.peel_drop_temps().kind 2 ( 0.00%) && op.node == BinOpKind::Or . { 9 ( 0.00%) vec![ 1 ( 0.00%) (expr.span.shrink_to_lo(), String::from("(")), . (expr.span.shrink_to_hi(), String::from(")")), . ] . } else { . vec![] . } 360 ( 0.00%) } . . fn span_extract_keyword(cx: &LateContext<'_>, span: Span, keyword: &str) -> Option { . span.with_source_text(cx, |snippet| { . tokenize_with_text(snippet) . .filter(|(t, s, _)| matches!(t, TokenKind::Ident if *s == keyword)) . .map(|(_, _, inner)| { . span.split_at(u32::try_from(inner.start).unwrap()) . .1 -- line 328 ---------------------------------------- -- line 330 ---------------------------------------- . .0 . }) . .next() . }) . .flatten() . } . . /// Peel the parentheses from an `if` expression, e.g. `((if true {} else {}))`. 280 ( 0.00%) pub(super) fn peel_parens(cx: &LateContext<'_>, mut span: Span) -> (Span, Span, Span) { . use crate::rustc_span::Pos as _; . . let start = span.shrink_to_lo(); . let end = span.shrink_to_hi(); . 20 ( 0.00%) span.with_source_text(cx, |snippet| { 80 ( 0.00%) if let Some((trim_start, _, trim_end)) = peel_parens_str(snippet) { 1,540 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/collapsible_if.rs:clippy_lints::collapsible_if::peel_parens_str (20x) . let mut data = span.data(); . data.lo = data.lo + BytePos::from_usize(trim_start); . data.hi = data.hi - BytePos::from_usize(trim_end); . span = data.span(); . } . }); . 60 ( 0.00%) (start.with_hi(span.lo()), span, end.with_lo(span.hi())) 160 ( 0.00%) } . 200 ( 0.00%) fn peel_parens_str(snippet: &str) -> Option<(usize, &str, usize)> { . let trimmed = snippet.trim(); 20 ( 0.00%) if !(trimmed.starts_with('(') && trimmed.ends_with(')')) { . return None; . } . . let trim_start = (snippet.len() - snippet.trim_start().len()) + 1; . let trim_end = (snippet.len() - snippet.trim_end().len()) + 1; . . let inner = snippet.get(trim_start..snippet.len() - trim_end)?; . Some(match peel_parens_str(inner) { . None => (trim_start, inner, trim_end), . Some((start, inner, end)) => (trim_start + start, inner, trim_end + end), . }) 160 ( 0.00%) } 1,514 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_id/src/lib.rs -------------------------------------------------------------------------------- Ir -- line 76 ---------------------------------------- . /// `hir::Item`, `hir::TraitItem`, or `hir::ImplItem` (i.e., the closest "item-like"), . /// and the `local_id` which is unique within the given owner. . /// . /// This two-level structure makes for more stable values: One can move an item . /// around within the source code, or add or remove stuff before it, without . /// the `local_id` part of the `HirId` changing, which is a very useful property in . /// incremental compilation where we have to persist things through changes to . /// the code base. 786,106 ( 0.02%) #[derive(Copy, Clone, PartialEq, Eq, Hash, Encodable, Decodable, StableHash)] . #[rustc_pass_by_value] . pub struct HirId { 24,568 ( 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 120 ---------------------------------------- . . #[inline] . pub fn is_owner(self) -> bool { . self.local_id.index() == 0 . } . . #[inline] . pub fn make_owner(owner: LocalDefId) -> Self { 9 ( 0.00%) Self { owner: OwnerId { def_id: owner }, local_id: ItemLocalId::ZERO } . } . } . . impl fmt::Display for HirId { . fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { . write!(f, "{self:?}") . } . } -- line 136 ---------------------------------------- -- line 138 ---------------------------------------- . rustc_data_structures::define_stable_id_collections!(HirIdMap, HirIdSet, HirIdMapEntry, HirId); . rustc_data_structures::define_id_collections!( . ItemLocalMap, . ItemLocalSet, . ItemLocalMapEntry, . ItemLocalId . ); . 15,917 ( 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 ---------------------------------------- 9,674 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/byte_char_slices.rs -------------------------------------------------------------------------------- Ir -- line 32 ---------------------------------------- . pub BYTE_CHAR_SLICES, . style, . "hard to read byte char slice" . } . . declare_lint_pass!(ByteCharSlice => [BYTE_CHAR_SLICES]); . . impl<'tcx> LateLintPass<'tcx> for ByteCharSlice { 559,314 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 124,292 ( 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); . }, . ); . } 497,168 ( 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)> { 132,936 ( 0.00%) let (has_ref, expr) = if let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, inner) = expr.kind { . (true, inner) 213,060 ( 0.01%) } else if let Some(parent) = get_parent_expr(cx, expr) // Already checked by the parent expr. 5,112,324 ( 0.14%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (42,612x) 66,544 ( 0.00%) && let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Not, _) = parent.kind . { . return None; . } else { . (false, expr) . }; . 86,463 ( 0.00%) if let ExprKind::Array(members) = expr.kind 84 ( 0.00%) && !members.is_empty() 30 ( 0.00%) && !span_contains_comment(cx, expr.span) 150 ( 0.00%) && !span_contains_cfg(cx, expr.span) 17,044 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::span_contains_cfg (30x) . { . return members . .iter() . .try_fold(Vec::new(), |mut acc, member| { 60 ( 0.00%) if let ExprKind::Lit(lit) = member.kind 4 ( 0.00%) && let LitKind::Byte(_) = lit.node . && expr.span.eq_ctxt(member.span) . { . acc.push(lit.span); . return Some(acc); . } . None . }) . .map(|s| (has_ref, s)); -- line 104 ---------------------------------------- 167,934 ( 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; . 10,605 ( 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, . ) { 1,755 ( 0.00%) if op != BinOpKind::BitAnd || expr.span.from_expansion() || lhs.span.from_expansion() || rhs.span.from_expansion() { . return; . } . . // x & x.wrapping_neg() 240 ( 0.00%) if let Some(base) = matching_wrapping_neg(lhs, rhs) 166 ( 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 (40x) . // x.wrapping_neg() & x 40 ( 0.00%) .or_else(|| matching_wrapping_neg(rhs, lhs)) 196 ( 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 (40x) . && 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); 120 ( 0.00%) } else if let Some(base) = matching_nonzero_wrapping_neg(lhs, rhs) 196 ( 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 (40x) . // nz.get() & nz.get().wrapping_neg() or reversed 40 ( 0.00%) .or_else(|| matching_nonzero_wrapping_neg(rhs, lhs)) 166 ( 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 (40x) . && is_nonzero_int(cx, base) . { . maybe_emit_lint(cx, expr.span, base, msrv, true); 120 ( 0.00%) } else if let Some(base) = matching_nonzero_neg(lhs, rhs) 196 ( 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 (40x) . // nz.get() & -nz.get() or reversed 40 ( 0.00%) .or_else(|| matching_nonzero_neg(rhs, lhs)) 166 ( 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 (40x) . && is_nonzero_signed_int(cx, base) . { . maybe_emit_lint(cx, expr.span, base, msrv, true); . } 12,120 ( 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, . ); . } . 80 ( 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) 80 ( 0.00%) } . . fn matching_neg<'tcx>(base: &'tcx Expr<'tcx>, negated: &Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { 288 ( 0.00%) if let ExprKind::Unary(UnOp::Neg, inner) = negated.kind . && is_same_local_path(base, inner) . { . Some(base) . } else { . None . } . } . 80 ( 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) 80 ( 0.00%) } . 80 ( 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 . } 80 ( 0.00%) } . . fn wrapping_neg_receiver<'tcx>(expr: &Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { 181 ( 0.00%) if let ExprKind::MethodCall(method_name, receiver, [], _) = expr.kind 7 ( 0.00%) && method_name.ident.name == sym::wrapping_neg . { . Some(receiver) . } else { . None . } . } . . fn get_receiver<'tcx>(expr: &Expr<'tcx>) -> Option<&'tcx Expr<'tcx>> { 362 ( 0.00%) if let ExprKind::MethodCall(method_name, receiver, [], _) = expr.kind 14 ( 0.00%) && method_name.ident.name == sym::get . && is_local_path(receiver) . { . Some(receiver) . } else { . None . } . } . -- line 127 ---------------------------------------- 120 ( 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 { 559,314 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 1,533 ( 0.00%) let Some(macro_call) = root_macro_call_first_node(cx, expr) else { . return; . }; 2,578 ( 0.00%) let Some(VecArgs::Repeat(elem, len)) = VecArgs::hir(cx, expr) else { 40,101 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (511x) . return; . }; . let Some((symbol, func_span)) = ref_init(cx, elem) else { . return; . }; . . emit_lint(cx, symbol, macro_call.span, elem, len, func_span); 497,168 ( 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 ---------------------------------------- -- line 114 ---------------------------------------- . Applicability::HasPlaceholders, . ); . }, . ); . } . . /// Checks whether the given `expr` is a call to `Arc::new`, `Rc::new`, or evaluates to a `Weak` . fn ref_init(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option<(Symbol, Span)> { 51 ( 0.00%) if let ExprKind::Call(func, _args) = expr.kind 25 ( 0.00%) && let ExprKind::Path(ref func_path @ QPath::TypeRelative(ty, _)) = func.kind 15 ( 0.00%) && let TyKind::Path(ref ty_path) = ty.kind 25 ( 0.00%) && let Some(def_id) = cx.qpath_res(ty_path, ty.hir_id).opt_def_id() 115 ( 0.00%) => ???:::qpath_res (5x) . { 10 ( 0.00%) if last_path_segment(func_path).ident.name == sym::new 20 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::last_path_segment (5x) 2 ( 0.00%) && let Some(symbol) = cx . .tcx 3 ( 0.00%) .get_diagnostic_name(def_id) 87 ( 0.00%) => ???:::get_diagnostic_name (1x) . .filter(|symbol| symbol == &sym::Arc || symbol == &sym::Rc) . { . return Some((symbol, func.span)); . } . 25 ( 0.00%) if let ty::Adt(adt, _) = *cx.typeck_results().expr_ty(expr).kind() 200 ( 0.00%) => ???:::expr_ty (5x) 35 ( 0.00%) && matches!(cx.tcx.get_diagnostic_name(adt.did()), Some(sym::RcWeak | sym::ArcWeak)) 299 ( 0.00%) => ???:::get_diagnostic_name (5x) . { . return Some((sym::Weak, func.span)); . } . } . . None . } 526 ( 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<'_>) { 248,254 ( 0.01%) match expr.kind { 1,690 ( 0.00%) hir::ExprKind::Binary(op, _, _) => { 6,760 ( 0.00%) check_expr_inner(cx, expr, op.node, op.span); . }, 330 ( 0.00%) hir::ExprKind::AssignOp(op, _, _) => { 495 ( 0.00%) check_expr_inner(cx, expr, op.node.into(), op.span); . }, . _ => {}, . } . } . } . 12,985 ( 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) 5,957 ( 0.00%) && let Some(binop_trait_id) = cx.tcx.lang_items().get(binop_trait_lang) 34,040 ( 0.00%) => ???:::lang_items (851x) 3,404 ( 0.00%) && let Some(op_assign_trait_id) = cx.tcx.lang_items().get(op_assign_trait_lang) 34,040 ( 0.00%) => ???:::lang_items (851x) . . // Check for more than one binary operation in the implemented function . // Linting when multiple operations are involved can result in false positives 3,404 ( 0.00%) && let parent_fn = cx.tcx.hir_get_parent_item(expr.hir_id).def_id 16,169 ( 0.00%) => ???:::hir_get_parent_item (851x) 2,376 ( 0.00%) && let hir::Node::ImplItem(impl_item) = cx.tcx.hir_node_by_def_id(parent_fn) 2,660 ( 0.00%) && let hir::ImplItemKind::Fn(_, body_id) = impl_item.kind 1,312 ( 0.00%) && let body = cx.tcx.hir_body(body_id) 42,869 ( 0.00%) => ???:::hir_body (656x) 2,624 ( 0.00%) && let parent_fn = cx.tcx.hir_get_parent_item(expr.hir_id) 12,464 ( 0.00%) => ???:::hir_get_parent_item (656x) 2,624 ( 0.00%) && let Some(trait_ref) = trait_ref_of_method(cx, parent_fn) 95,562 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::trait_ref_of_method (656x) 144 ( 0.00%) && 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() 3,168 ( 0.00%) .find(|&(ts, _)| ts.iter().any(|&t| Some(trait_id) == cx.tcx.lang_items().get(t))) 57,600 ( 0.00%) => ???:::lang_items (1,440x) . && count_binops(body.value) == 1 . { . span_lint( . cx, . lint, . span, . format!( . "suspicious use of `{}` in `{}` impl", . binop.as_str(), . cx.tcx.item_name(trait_id) . ), . ); . } 14,840 ( 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 ---------------------------------------- 9,349 ( 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 = { 10,874 ( 0.00%) let mut visitor = TypeComplexityVisitor { score: 0, nest: 1 }; . visitor.visit_ty_unambig(ty); 5,167 ( 0.00%) visitor.score . }; . 10,874 ( 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 32 ---------------------------------------- . /// total complexity score of the type . score: u64, . /// current nesting level . nest: u64, . } . . impl<'tcx> Visitor<'tcx> for TypeComplexityVisitor { . fn visit_infer(&mut self, inf_id: hir::HirId, _inf_span: Span, _kind: InferKind<'tcx>) -> Self::Result { 1 ( 0.00%) self.score += 1; . self.visit_id(inf_id); . } . 36,868 ( 0.00%) fn visit_ty(&mut self, ty: &'tcx hir::Ty<'_, AmbigArg>) { 82,953 ( 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 21,156 ( 0.00%) TyKind::Path(..) | TyKind::Slice(..) | TyKind::Tup(..) | TyKind::Array(..) => (10 * self.nest, 1), . . // function types bring a lot of overhead . TyKind::FnPtr(fn_ptr) if fn_ptr.abi == ExternAbi::Rust => (50 * self.nest, 1), . 8 ( 0.00%) TyKind::TraitObject(param_bounds, _) => { . let has_lifetime_parameters = param_bounds.iter().any(|bound| { . bound . .bound_generic_params . .iter() . .any(|param| matches!(param.kind, GenericParamKind::Lifetime { .. })) . }); . if has_lifetime_parameters { . // complex trait bounds like A<'a, 'b> . (50 * self.nest, 1) . } else { . // simple trait bounds like A + B 32 ( 0.00%) (20 * self.nest, 0) . } . }, . . _ => (0, 0), . }; 9,217 ( 0.00%) self.score += add_score; 9,217 ( 0.00%) self.nest += sub_nest; 18,434 ( 0.00%) walk_ty(self, ty); 644,776 ( 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:: (5,167x) 9,217 ( 0.00%) self.nest -= sub_nest; 36,868 ( 0.00%) } . } 27,644 ( 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/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. 225,506 ( 0.01%) unsafe { crate::intrinsics::copy_nonoverlapping(src, dst, count) } 106,184 ( 0.00%) => ???:0x0000000000173dc0 (6,840x) . } . . /// 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) . ); 8,984 ( 0.00%) crate::intrinsics::copy(src, dst, count) 78 ( 0.00%) => ???:0x0000000000173dc0 (6x) . } . } . . /// 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) . ); 21,585 ( 0.00%) crate::intrinsics::write_bytes(dst, val, count) 121 ( 0.00%) => ???:0x00000000001747c0 (11x) . } . } . . /// 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 81 ( 0.00%) unsafe { drop_glue(&mut *to_drop) } 235 ( 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]> (1x) . } . . /// Helper function for `drop_in_place`. The compiler replaces this by the actual drop glue. . #[lang = "drop_glue"] 1,594,682 ( 0.04%) pub(crate) const unsafe fn drop_glue(_: &mut T) 75 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue:: (3x) . where . T: [const] Destruct, . { . // Code here does not matter - this is replaced by the . // real drop glue by the compiler. . } . . /// Creates a null raw pointer. -- line 855 ---------------------------------------- -- line 1464 ---------------------------------------- . i += 1; . } . } . . // Don't let MIR inline this, because we really want it to keep its noalias metadata . #[rustc_no_mir_inline] . #[inline] . fn swap_chunk(x: &mut MaybeUninit<[u8; N]>, y: &mut MaybeUninit<[u8; N]>) { 8,925 ( 0.00%) let a = *x; . let b = *y; 23,062 ( 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) . ); 153,504 ( 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,034,370 ( 0.03%) intrinsics::write_via_move(dst, src) 1,586 ( 0.00%) => ???:0x0000000000173dc0 (122x) . } . } . . /// 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 { 34,194 ( 0.00%) a == b . } . . /// Compares the *addresses* of the two pointers for equality, . /// ignoring any metadata in fat pointers. . /// . /// If the arguments are thin pointers of the same type, . /// then this is the same as [`eq`]. . /// -- line 2516 ---------------------------------------- -- line 2524 ---------------------------------------- . /// . /// assert!(ptr::addr_eq(whole, first)); . /// assert!(!ptr::eq::(whole, first)); . /// ``` . #[stable(feature = "ptr_addr_eq", since = "1.76.0")] . #[inline(always)] . #[must_use = "pointer comparison produces a value"] . pub fn addr_eq(p: *const T, q: *const U) -> bool { 39,729 ( 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 ---------------------------------------- 114,827 ( 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 { 346,136 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 98,896 ( 0.00%) if expr.span.from_expansion() { . return; . } . 189,003 ( 0.01%) if let ExprKind::Binary(Spanned { node: op, .. }, ref left, ref right) = expr.kind { . let span_sugg = |lint: &'static Lint, expr: &Expr, sugg, appl| { 11 ( 0.00%) span_lint_and_sugg( 801 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_sugg:: (1x) . cx, . lint, 1 ( 0.00%) expr.span, . "operator precedence might not be obvious", . "consider parenthesizing your expression", . sugg, . appl, . ); . }; . . if !is_bit_op(op) { . return; . } 172 ( 0.00%) let mut applicability = Applicability::MachineApplicable; 363 ( 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 85 ---------------------------------------- . snippet_with_applicability(cx, left.span, "..", &mut applicability), . op.as_str(), . snippet_with_applicability(cx, right.span, "..", &mut applicability) . ); . span_sugg(lint_for(&[op, left_op, right_op]), expr, sugg, applicability); . }, . (BitAnd | BitOr | BitXor, Some(side_op @ (Shl | Shr | Add | Div | Mul | Rem | Sub)), _) . | (Shl | Shr, Some(side_op @ (Add | Div | Mul | Rem | Sub)), _) => { 10 ( 0.00%) let sugg = format!( . "({}) {} {}", 1 ( 0.00%) snippet_with_applicability(cx, left.span, "..", &mut applicability), 4 ( 0.00%) op.as_str(), 6 ( 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:::as_str (1x) 1 ( 0.00%) snippet_with_applicability(cx, right.span, "..", &mut applicability) . ); . span_sugg(lint_for(&[op, side_op]), expr, sugg, applicability); 1 ( 0.00%) }, . (BitAnd | BitOr | BitXor, _, Some(side_op @ (Shl | Shr | Add | Div | Mul | Rem | Sub))) . | (Shl | Shr, _, Some(side_op @ (Add | Div | Mul | Rem | Sub))) => { . let sugg = format!( . "{} {} ({})", . snippet_with_applicability(cx, left.span, "..", &mut applicability), . 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 25,044 ( 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, . ); . }); . } 395,584 ( 0.01%) } . } . . fn get_bin_opt(expr: &Expr) -> Option { 688 ( 0.00%) match expr.kind { 3 ( 0.00%) ExprKind::Binary(Spanned { node: op, .. }, _, _) => Some(op), . _ => None, . } . } . . #[must_use] . fn is_bit_op(op: BinOpKind) -> bool { 4,549 ( 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 ---------------------------------------- 184 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memchr-2.8.2/src/vector.rs -------------------------------------------------------------------------------- Ir -- line 139 ---------------------------------------- . #[inline(always)] . fn all_zeros_except_least_significant(n: usize) -> SensibleMoveMask { . debug_assert!(n < 32); . SensibleMoveMask(!((1 << n) - 1)) . } . . #[inline(always)] . fn has_non_zero(self) -> bool { 68,045 ( 0.00%) self.0 != 0 . } . . #[inline(always)] . fn count_ones(self) -> usize { . self.0.count_ones() as usize . } . . #[inline(always)] -- line 155 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/vec_box.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_hir_analysis::lower_ty; . use rustc_lint::LateContext; . use rustc_middle::ty::TypeVisitableExt as _; . use rustc_middle::ty::layout::LayoutOf as _; . use rustc_span::symbol::sym; . . use super::VEC_BOX; . 29,128 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . hir_ty: &hir::Ty<'_>, . qpath: &QPath<'tcx>, . def_id: DefId, . box_size_threshold: u64, . ) -> bool { 21,184 ( 0.00%) if cx.tcx.is_diagnostic_item(sym::Vec, def_id) 165,370 ( 0.00%) => ???:::is_diagnostic_item (2,648x) 600 ( 0.00%) && let Some(last) = last_path_segment(qpath).args 1,440 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::last_path_segment (120x) . // Get the _ part of Vec<_> 480 ( 0.00%) && let Some(GenericArg::Type(ty)) = last.args.first() . // extract allocator from the Vec for later . && let vec_alloc_ty = last.args.get(1) . // ty is now _ at this point 477 ( 0.00%) && let TyKind::Path(ref ty_qpath) = ty.kind 702 ( 0.00%) && let res = cx.qpath_res(ty_qpath, ty.hir_id) 2,691 ( 0.00%) => ???:::qpath_res (117x) . && let Some(def_id) = res.opt_def_id() 175 ( 0.00%) && Some(def_id) == cx.tcx.lang_items().owned_box() 3,480 ( 0.00%) => ???:::lang_items (87x) . // At this point, we know ty is Box, now get T 4 ( 0.00%) && let Some(last) = last_path_segment(ty_qpath).args 12 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::last_path_segment (1x) 4 ( 0.00%) && let Some(GenericArg::Type(boxed_ty)) = last.args.first() . // extract allocator from the Box for later . && let boxed_alloc_ty = last.args.get(1) . // we don't expect to encounter `_` here so ignore `GenericArg::Infer` is okay 4 ( 0.00%) && let ty_ty = lower_ty(cx.tcx, boxed_ty.as_unambig_ty()) 31,287 ( 0.00%) => ???:rustc_hir_analysis::lower_ty (1x) 1 ( 0.00%) && !ty_ty.has_escaping_bound_vars() 9 ( 0.00%) && ty_ty.is_sized(cx.tcx, cx.typing_env()) 4,784 ( 0.00%) => ???:::is_sized (1x) 21 ( 0.00%) => ???:::typing_env (1x) . && let Ok(ty_ty_size) = cx.layout_of(ty_ty).map(|l| l.size.bytes()) . && ty_ty_size < box_size_threshold . // https://github.com/rust-lang/rust-clippy/issues/7114 . && match (vec_alloc_ty, boxed_alloc_ty) { . (None, None) => true, . // this is in the event that we have something like . // Vec<_, Global>, in which case is equivalent to . // Vec<_> -- line 49 ---------------------------------------- -- line 69 ---------------------------------------- . "try", . format!("Vec<{}>", snippet(cx, boxed_ty.span, "..")), . Applicability::Unspecified, . ); . true . } else { . false . } 21,184 ( 0.00%) } 178 ( 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 { 192,850 ( 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 { 46,810 ( 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); 702 ( 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 ---------------------------------------- 12,230 ( 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 130,406 ( 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. 1,716 ( 0.00%) && field.ident.as_str().as_bytes().first().is_some_and(u8::is_ascii_digit) 27,456 ( 0.00%) => ???:::as_str (858x) . // 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, . ); . }, . ); . } 435,022 ( 0.01%) } . } 1,716 ( 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 248,584 ( 0.01%) if let ExprKind::Call(..) | ExprKind::MethodCall(..) = expr.kind 25,608 ( 0.00%) && let child_ty = cx.typeck_results().expr_ty(expr) 513,600 ( 0.01%) => ???:::expr_ty (12,804x) 16,840 ( 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); . }, . _ => {}, . } . } 497,168 ( 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 ---------------------------------------- 12,804 ( 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; _]); 44 ( 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) { 166 ( 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. 59,059 ( 0.00%) fn get_def_id_availability(&mut self, tcx: TyCtxt<'_>, def_id: DefId, needs_const: bool) -> Availability { . if let Some(availability) = self.availability_cache.get(&(def_id, needs_const)) { 10,210 ( 0.00%) return *availability; . } 792 ( 0.00%) let (feature, stability_level) = if needs_const { . tcx.lookup_const_stability(def_id) . .map(|stability| (stability.feature, stability.level)) . .unzip() . } else { . tcx.lookup_stability(def_id) . .map(|stability| (stability.feature, stability.level)) . .unzip() . }; 1,841 ( 0.00%) let version = if feature.is_some_and(|feature| tcx.features().enabled(feature)) { 10,520 ( 0.00%) => ???:::features (263x) 1,052 ( 0.00%) => ???:::enabled (263x) . Availability::FeatureEnabled . } else if let Some(StableSince::Version(version)) = . stability_level.as_ref().and_then(StabilityLevel::stable_since) . { . Availability::Since(version) . } else if needs_const { . // Fallback to regular stability . self.get_def_id_availability(tcx, def_id, false) -- line 154 ---------------------------------------- -- line 158 ---------------------------------------- . Availability::Since(RustcVersion { . major: 1, . minor: 0, . patch: 0, . }) . }; . self.availability_cache.insert((def_id, needs_const), version); . version 48,321 ( 0.00%) } . . /// Emit lint if `def_id`, associated with `node` and `span`, is below the current MSRV. 348,375 ( 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(); 25,284 ( 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, 2,408 ( 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. 85,888 ( 0.00%) if let Some(current) = self.msrv.current(cx) 53,680 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::current (5,368x) 80,520 ( 0.00%) && let Availability::Since(version) = self.get_def_id_availability(cx.tcx, def_id, needs_const) 782,517 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::get_def_id_availability (5,368x) 21,472 ( 0.00%) && version > current . && (self.check_in_tests || !is_in_test(cx.tcx, node)) . { . span_lint_and_then( . cx, . INCOMPATIBLE_MSRV, . span, . format!( . "current MSRV (Minimum Supported Rust Version) is `{current}` but this item is stable{} since `{version}`", -- line 208 ---------------------------------------- -- line 210 ---------------------------------------- . ), . |diag| { . if is_under_cfg_attribute(cx, node) { . diag.note_once("you may want to conditionally increase the MSRV considered by Clippy using the `clippy::msrv` attribute"); . } . }, . ); . } 185,800 ( 0.01%) } . } . . impl<'tcx> LateLintPass<'tcx> for IncompatibleMsrv { 559,314 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 396,990 ( 0.01%) match expr.kind { . ExprKind::MethodCall(_, _, _, span) => { 46,144 ( 0.00%) if let Some(method_did) = cx.typeck_results().type_dependent_def_id(expr.hir_id) { 337,104 ( 0.01%) => ???:::type_dependent_def_id (6,592x) 79,104 ( 0.00%) self.emit_lint_if_under_msrv(cx, is_in_const_context(cx), method_did, expr.hir_id, span); 2,178,272 ( 0.06%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (6,592x) 855,082 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::emit_lint_if_under_msrv (6,592x) . } . }, 43,468 ( 0.00%) ExprKind::Call(callee, _) if let ExprKind::Path(qpath) = callee.kind => { 12,416 ( 0.00%) self.called_path = Some(callee.hir_id); 18,624 ( 0.00%) let needs_const = is_in_const_context(cx); 2,078,000 ( 0.06%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (6,208x) 37,248 ( 0.00%) let def_id = if let Some(def_id) = cx.qpath_res(&qpath, callee.hir_id).opt_def_id() { 249,613 ( 0.01%) => ???:::qpath_res (6,208x) . def_id 244 ( 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; . }; 42,602 ( 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. 24,025 ( 0.00%) ExprKind::Path(qpath) 216,225 ( 0.01%) if let Some(path_def_id) = cx.qpath_res(&qpath, expr.hir_id).opt_def_id() 671,229 ( 0.02%) => ???:::qpath_res (24,025x) . && self.called_path != Some(expr.hir_id) => . { 7,560 ( 0.00%) self.emit_lint_if_under_msrv(cx, false, path_def_id, expr.hir_id, expr.span); . }, . _ => {}, . } 497,168 ( 0.01%) } . . fn check_ty(&mut self, cx: &LateContext<'tcx>, hir_ty: &'tcx hir::Ty<'tcx, AmbigArg>) { 90,348 ( 0.00%) if let hir::TyKind::Path(qpath) = hir_ty.kind 109,208 ( 0.00%) && let Some(ty_def_id) = cx.qpath_res(&qpath, hir_ty.hir_id).opt_def_id() 314,573 ( 0.01%) => ???:::qpath_res (13,651x) . // `CStr` and `CString` have been moved around but have been available since Rust 1.0.0 66,269 ( 0.00%) && !matches!(cx.tcx.get_diagnostic_name(ty_def_id), Some(sym::cstr_type | sym::cstring_type)) 591,601 ( 0.02%) => ???:::get_diagnostic_name (9,467x) . { 85,203 ( 0.00%) self.emit_lint_if_under_msrv(cx, false, ty_def_id, hir_ty.hir_id, hir_ty.span); 722,068 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/incompatible_msrv.rs:::emit_lint_if_under_msrv (9,467x) . } . } . } . . /// 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 ---------------------------------------- 58,975 ( 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 { 497,168 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, e: &Expr<'_>) { 137,354 ( 0.00%) if let ExprKind::Call(fn_expr, [arg1, arg2]) = e.kind 1,028 ( 0.00%) && fn_expr.basic_res().is_diag_item(cx, sym::mem_swap) 22 ( 0.00%) && let ctxt = e.span.ctxt() 143 ( 0.00%) && let (from_ptr1, arg1_span) = is_ptr_to_ref(cx, arg1, ctxt) 228 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/swap_ptr_to_ref.rs:clippy_lints::swap_ptr_to_ref::is_ptr_to_ref (11x) 121 ( 0.00%) && let (from_ptr2, arg2_span) = is_ptr_to_ref(cx, arg2, ctxt) 228 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/swap_ptr_to_ref.rs:clippy_lints::swap_ptr_to_ref::is_ptr_to_ref (11x) 66 ( 0.00%) && (from_ptr1 || from_ptr2) . { . span_lint_and_then( . cx, . SWAP_PTR_TO_REF, . e.span, . "call to `core::mem::swap` with a parameter derived from a raw pointer", . |diag| { . if !((from_ptr1 && arg1_span.is_none()) || (from_ptr2 && arg2_span.is_none())) { -- line 57 ---------------------------------------- -- line 63 ---------------------------------------- . "use ptr::swap", . format!("core::ptr::swap({snip1}, {snip2})"), . app, . ); . } . }, . ); . } 497,168 ( 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. 110 ( 0.00%) fn is_ptr_to_ref(cx: &LateContext<'_>, e: &Expr<'_>, ctxt: SyntaxContext) -> (bool, Option) { 134 ( 0.00%) if let ExprKind::AddrOf(BorrowKind::Ref, Mutability::Mut, borrowed_expr) = e.kind 36 ( 0.00%) && let ExprKind::Unary(UnOp::Deref, derefed_expr) = borrowed_expr.kind . && cx.typeck_results().expr_ty(derefed_expr).is_raw_ptr() . { . ( . true, . (borrowed_expr.span.ctxt() == ctxt || derefed_expr.span.ctxt() == ctxt).then_some(derefed_expr.span), . ) . } else { 44 ( 0.00%) (false, None) . } 132 ( 0.00%) } 55 ( 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,060 ( 0.00%) match cx.tcx.get_diagnostic_name(did)? { 74,030 ( 0.00%) => ???:::get_diagnostic_name (1,030x) . sym::slice_from_raw_parts => Some(RawPartsKind::Immutable), . sym::slice_from_raw_parts_mut => Some(RawPartsKind::Mutable), . _ => None, . } . } . 208 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, cast_expr: &Expr<'_>, cast_to: Ty<'_>, msrv: Msrv) { 52 ( 0.00%) if let ty::RawPtr(ptrty, _) = cast_to.kind() . && 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) -- line 37 ---------------------------------------- -- 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, . ); . } 208 ( 0.00%) } . . /// Checks for implicit cast from slice reference to raw slice pointer. 497,168 ( 0.01%) pub(super) fn check_implicit_cast(cx: &LateContext<'_>, expr: &Expr<'_>) { 16,044 ( 0.00%) if let ExprKind::Call(fun, [ptr_arg, len_arg]) = expr.peel_blocks().kind 3,120 ( 0.00%) && let ExprKind::Path(ref qpath) = fun.kind 4,160 ( 0.00%) && let Some(fun_def_id) = cx.qpath_res(qpath, fun.hir_id).opt_def_id() 64,195 ( 0.00%) => ???:::qpath_res (1,040x) 3,090 ( 0.00%) && let Some(rpk) = raw_parts_kind(cx, fun_def_id) 54 ( 0.00%) && !matches!(get_parent_expr(cx, expr).map(|e| e.kind), Some(ExprKind::Cast(..))) 2,142 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (18x) 72 ( 0.00%) && let [deref, borrow] = cx.typeck_results().expr_adjustments(expr) 705 ( 0.00%) => ???:::expr_adjustments (18x) 12 ( 0.00%) && matches!(deref.kind, Adjust::Deref(..)) 24 ( 0.00%) && let Adjustment { . kind: Adjust::Borrow(AutoBorrow::RawPtr(..)), . target, . } = borrow . && let ty::RawPtr(pointee_ty, _) = target.kind() . && pointee_ty.is_slice() . && !expr.span.from_expansion() . { . let func = match rpk { -- line 78 ---------------------------------------- -- 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, . ); . } 497,168 ( 0.01%) } 67,346 ( 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/../../portable-simd/crates/core_simd/src/simd/cmp/eq.rs -------------------------------------------------------------------------------- Ir -- line 23 ---------------------------------------- . impl SimdPartialEq for Simd<$number, N> . { . type Mask = Mask<<$number as SimdElement>::Mask, N>; . . #[inline] . fn simd_eq(self, other: Self) -> Self::Mask { . // Safety: `self` is a vector, and the result of the comparison . // is always a valid mask. 21,518 ( 0.00%) unsafe { Mask::from_simd_unchecked(core::intrinsics::simd::simd_eq(self, other)) } . } . . #[inline] . fn simd_ne(self, other: Self) -> Self::Mask { . // Safety: `self` is a vector, and the result of the comparison . // is always a valid mask. . unsafe { Mask::from_simd_unchecked(core::intrinsics::simd::simd_ne(self, other)) } . } -- line 39 ---------------------------------------- -------------------------------------------------------------------------------- -- 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { . // `&[foo.clone()]` expressions 129,448 ( 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 6,461 ( 0.00%) && let ExprKind::Array([item]) = &arr.kind . . // check for clones 28 ( 0.00%) && let ExprKind::MethodCall(path, recv, _, _) = item.kind . . && self.msrv.meets(cx, { . if is_in_const_context(cx) { . msrvs::CONST_SLICE_FROM_REF . } else { . msrvs::SLICE_FROM_REF . } . }) -- line 84 ---------------------------------------- -- 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, . ); . } 497,168 ( 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/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 { 18,218 ( 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 { 12,134 ( 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. . 39,767 ( 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 { 64,962 ( 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. . 56,437 ( 0.00%) if self < rhs { . None . } else { . // SAFETY: just checked this can't overflow 31,150 ( 0.00%) Some(unsafe { intrinsics::unchecked_sub(self, rhs) }) . } . } . . /// Strict integer subtraction. Computes `self - rhs`, panicking if . /// overflow occurred. . /// . /// # Panics . /// -- line 1064 ---------------------------------------- -- line 1144 ---------------------------------------- . ( . lhs: $SelfT = self, . rhs: $SelfT = rhs, . ) => !lhs.overflowing_sub(rhs).1, . ); . . // SAFETY: this is guaranteed to be safe by the caller. . unsafe { 9 ( 0.00%) intrinsics::unchecked_sub(self, rhs) . } . } . . /// Checked subtraction with a signed integer. Computes `self - rhs`, . /// returning `None` if overflow occurred. . /// . /// # Examples . /// -- line 1160 ---------------------------------------- -- line 1353 ---------------------------------------- . ( . lhs: $SelfT = self, . rhs: $SelfT = rhs, . ) => !lhs.overflowing_mul(rhs).1, . ); . . // SAFETY: this is guaranteed to be safe by the caller. . unsafe { 112,533 ( 0.00%) intrinsics::unchecked_mul(self, rhs) . } . } . . /// Checked integer division. Computes `self / rhs`, returning `None` . /// if `rhs == 0`. . /// . /// # Examples . /// -- line 1369 ---------------------------------------- -- line 2048 ---------------------------------------- . concat!(stringify!($SelfT), "::unchecked_shl cannot overflow"), . ( . rhs: u32 = rhs, . ) => rhs < <$ActualT>::BITS, . ); . . // SAFETY: this is guaranteed to be safe by the caller. . unsafe { 600 ( 0.00%) intrinsics::unchecked_shl(self, rhs) . } . } . . /// Unbounded shift left. Computes `self << rhs`, without bounding the value of `rhs`. . /// . /// If `rhs` is larger or equal to the number of bits in `self`, . /// the entire value is shifted out, and `0` is returned. . /// -- line 2064 ---------------------------------------- -- 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 { 6,191 ( 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 { 86,067 ( 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 { 109,371 ( 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 { 45,271 ( 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 { 170,812 ( 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) { 24 ( 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) { 217,774 ( 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 { 13 ( 0.00%) let d = self / rhs; 8 ( 0.00%) let r = self % rhs; 14 ( 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 { 15 ( 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; } . 72 ( 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. 36 ( 0.00%) let z = unsafe { intrinsics::ctlz_nonzero(p) }; 72 ( 0.00%) <$SelfT>::MAX >> z . } . . /// Returns the smallest power of two greater than or equal to `self`. . /// . /// When return value overflows (i.e., `self > (1 << (N-1))` for type . /// `uN`), it panics in debug mode and the return value is wrapped to 0 in . /// release mode (the only situation in which this method can return 0). . /// -- line 3882 ---------------------------------------- -- line 3889 ---------------------------------------- . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_int_pow", since = "1.50.0")] . #[must_use = "this returns the result of the operation, \ . without modifying the original"] . #[inline] . #[rustc_inherit_overflow_checks] . pub const fn next_power_of_two(self) -> Self { 5 ( 0.00%) self.one_less_than_next_power_of_two() + 1 . } . . /// Returns the smallest power of two greater than or equal to `self`. If . /// the next power of two is greater than the type's maximum value, . /// `None` is returned, otherwise the power of two is wrapped in `Some`. . /// . /// # Examples . /// -- line 3905 ---------------------------------------- -- line 4010 ---------------------------------------- . without modifying the original"] . #[allow(unnecessary_transmutes)] . // SAFETY: const sound because integers are plain old datatypes so we can always . // transmute them to arrays of bytes . #[inline] . pub const fn to_ne_bytes(self) -> [u8; size_of::()] { . // SAFETY: integers are plain old datatypes so we can always transmute them to . // arrays of bytes 32 ( 0.00%) unsafe { mem::transmute(self) } . } . . /// Creates a native endian integer value from its representation . /// as a byte array in big endian. . /// . #[doc = $from_xe_bytes_doc] . /// . /// # Examples -- line 4026 ---------------------------------------- 188,762 ( 0.01%) -------------------------------------------------------------------------------- -- 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 { 248,584 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &'_ Expr<'_>) { 141,251 ( 0.00%) if let ExprKind::Call(path, [arg]) = expr.kind 13,908 ( 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", . ); . } 310,730 ( 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/collections/btree/node.rs -------------------------------------------------------------------------------- Ir -- line 232 ---------------------------------------- . } . } . . impl NodeRef { . /// Creates a new internal (height > 0) `NodeRef` . fn new_internal(child: Root, alloc: A) -> Self { . let mut new_node = unsafe { InternalNode::new(alloc) }; . new_node.edges[0].write(child.node); 8 ( 0.00%) NodeRef::from_new_internal(new_node, NonZero::new(child.height + 1).unwrap()) . } . . /// Creates a new internal (height > 0) `NodeRef` from an existing internal node . fn from_new_internal( . internal: Box, A>, . height: NonZero, . ) -> Self { . // The allocator must be dropped, not leaked. See also `BTreeMap::alloc`. -- line 248 ---------------------------------------- -- line 282 ---------------------------------------- . impl NodeRef { . /// Finds the length of the node. This is the number of keys or values. . /// The number of edges is `len() + 1`. . /// Note that, despite being safe, calling this function can have the side effect . /// of invalidating mutable references that unsafe code has created. . pub(super) fn len(&self) -> usize { . // Crucially, we only access the `len` field here. If BorrowType is marker::ValMut, . // there might be outstanding mutable references to values that we must not invalidate. 4,921 ( 0.00%) unsafe { usize::from((*Self::as_leaf_ptr(self)).len) } . } . . /// Returns the number of levels that the node and leaves are apart. Zero . /// height means the node is a leaf itself. If you picture trees with the . /// root on top, the number says at which elevation the node appears. . /// If you picture trees with leaves on top, the number says how high . /// the tree extends above the node. . pub(super) fn height(&self) -> usize { -- line 298 ---------------------------------------- -- line 306 ---------------------------------------- . . /// Exposes the leaf portion of any leaf or internal node. . /// . /// Returns a raw ptr to avoid invalidating other references to this node. . fn as_leaf_ptr(this: &Self) -> *mut LeafNode { . // The node must be valid for at least the LeafNode portion. . // This is not a reference in the NodeRef type because we don't know if . // it should be unique or shared. 674 ( 0.00%) this.node.as_ptr() . } . } . . impl NodeRef { . /// Finds the parent of the current node. Returns `Ok(handle)` if the current . /// node actually has a parent, where `handle` points to the edge of the parent . /// that points to the current node. Returns `Err(self)` if the current node has . /// no parent, giving back the original `NodeRef`. -- line 322 ---------------------------------------- -- line 330 ---------------------------------------- . ) -> Result, marker::Edge>, Self> { . const { . assert!(BorrowType::TRAVERSAL_PERMIT); . } . . // We need to use raw pointers to nodes because, if BorrowType is marker::ValMut, . // there might be outstanding mutable references to values that we must not invalidate. . let leaf_ptr: *const _ = Self::as_leaf_ptr(&self); 304 ( 0.00%) unsafe { (*leaf_ptr).parent } . .as_ref() . .map(|parent| Handle { 196 ( 0.00%) node: NodeRef::from_internal(*parent, self.height + 1), 192 ( 0.00%) idx: unsafe { usize::from((*leaf_ptr).parent_idx.assume_init()) }, . _marker: PhantomData, . }) . .ok_or(self) . } . . pub(super) fn first_edge(self) -> Handle { . unsafe { Handle::new_edge(self, 0) } . } -- line 350 ---------------------------------------- -- line 388 ---------------------------------------- . let ptr = Self::as_leaf_ptr(&self); . // SAFETY: there can be no mutable references into this tree borrowed as `Immut`. . unsafe { &*ptr } . } . . /// Borrows a view into the keys stored in the node. . pub(super) fn keys(&self) -> &[K] { . let leaf = self.into_leaf(); 3,792 ( 0.00%) unsafe { leaf.keys.get_unchecked(..usize::from(leaf.len)).assume_init_ref() } . } . } . . impl NodeRef { . /// Similar to `ascend`, gets a reference to a node's parent node, but also . /// deallocates the current node in the process. This is unsafe because the . /// current node will still be accessible despite being deallocated. . pub(super) unsafe fn deallocate_and_ascend( -- line 404 ---------------------------------------- -- line 406 ---------------------------------------- . alloc: A, . ) -> Option, marker::Edge>> { . let height = self.height; . let node = self.node; . let ret = self.ascend().ok(); . unsafe { . alloc.deallocate( . node.cast(), 108 ( 0.00%) if height > 0 { . Layout::new::>() . } else { . Layout::new::>() . }, . ); . } . ret . } -- line 422 ---------------------------------------- -- line 567 ---------------------------------------- . } . } . . impl<'a, K: 'a, V: 'a> NodeRef, K, V, marker::LeafOrInternal> { . /// Sets the node's link to its parent edge, . /// without invalidating other references to the node. . fn set_parent_link(&mut self, parent: NonNull>, parent_idx: usize) { . let leaf = Self::as_leaf_ptr(self); 461 ( 0.00%) unsafe { (*leaf).parent = Some(parent) }; . unsafe { (*leaf).parent_idx.write(parent_idx as u16) }; . } . } . . impl NodeRef { . /// Clears the root's link to its parent edge. . fn clear_parent_link(&mut self) { . let mut root_node = self.borrow_mut(); -- line 583 ---------------------------------------- -- line 633 ---------------------------------------- . } . } . . impl NodeRef { . /// Mutably borrows the owned root node. Unlike `reborrow_mut`, this is safe . /// because the return value cannot be used to destroy the root, and there . /// cannot be other references to the tree. . pub(super) fn borrow_mut(&mut self) -> NodeRef, K, V, Type> { 925 ( 0.00%) NodeRef { height: self.height, node: self.node, _marker: PhantomData } . } . . /// Slightly mutably borrows the owned root node. . pub(super) fn borrow_valmut(&mut self) -> NodeRef, K, V, Type> { . NodeRef { height: self.height, node: self.node, _marker: PhantomData } . } . . /// Irreversibly transitions to a reference that permits traversal and offers -- line 649 ---------------------------------------- -- line 663 ---------------------------------------- . pub(super) unsafe fn push_with_handle<'b>( . &mut self, . key: K, . val: V, . ) -> Handle, K, V, marker::Leaf>, marker::KV> { . let len = self.len_mut(); . let idx = usize::from(*len); . assert!(idx < CAPACITY); 3 ( 0.00%) *len += 1; . unsafe { . self.key_area_mut(idx).write(key); . self.val_area_mut(idx).write(val); . Handle::new_kv( . NodeRef { height: self.height, node: self.node, _marker: PhantomData }, . idx, . ) . } -- line 679 ---------------------------------------- -- line 686 ---------------------------------------- . unsafe { self.push_with_handle(key, val).into_val_mut() } . } . } . . impl<'a, K: 'a, V: 'a> NodeRef, K, V, marker::Internal> { . /// Adds a key-value pair, and an edge to go to the right of that pair, . /// to the end of the node. . pub(super) fn push(&mut self, key: K, val: V, edge: Root) { 8 ( 0.00%) assert!(edge.height == self.height - 1); . . let len = self.len_mut(); . let idx = usize::from(*len); . assert!(idx < CAPACITY); 4 ( 0.00%) *len += 1; . unsafe { . self.key_area_mut(idx).write(key); . self.val_area_mut(idx).write(val); . self.edge_area_mut(idx + 1).write(edge.node); . Handle::new_edge(self.reborrow_mut(), idx + 1).correct_parent_link(); . } . } . } -- line 707 ---------------------------------------- -- line 723 ---------------------------------------- . impl NodeRef { . /// Checks whether a node is an `Internal` node or a `Leaf` node. . pub(super) fn force( . self, . ) -> ForceResult< . NodeRef, . NodeRef, . > { 6,962 ( 0.00%) if self.height == 0 { . ForceResult::Leaf(NodeRef { . height: self.height, . node: self.node, . _marker: PhantomData, . }) . } else { . ForceResult::Internal(NodeRef { . height: self.height, -- line 739 ---------------------------------------- -- line 804 ---------------------------------------- . Handle { node, idx, _marker: PhantomData } . } . . pub(super) fn left_edge(self) -> Handle, marker::Edge> { . unsafe { Handle::new_edge(self.node, self.idx) } . } . . pub(super) fn right_edge(self) -> Handle, marker::Edge> { 2,329 ( 0.00%) unsafe { Handle::new_edge(self.node, self.idx + 1) } . } . } . . impl PartialEq . for Handle, HandleType> . { . fn eq(&self, other: &Self) -> bool { . let Self { node, idx, _marker } = self; -- line 820 ---------------------------------------- -- line 862 ---------------------------------------- . /// . /// # Safety . /// . /// The reborrow must have ended, i.e., the reference returned by `new` and . /// all pointers and references derived from it, must not be used anymore. . pub(super) unsafe fn awaken<'a>( . self, . ) -> Handle, K, V, NodeType>, HandleType> { 2,265 ( 0.00%) Handle { node: unsafe { self.node.awaken() }, idx: self.idx, _marker: PhantomData } . } . } . . impl Handle, marker::Edge> { . /// Creates a new handle to an edge in `node`. . /// Unsafe because the caller must ensure that `idx <= node.len()`. . pub(super) unsafe fn new_edge(node: NodeRef, idx: usize) -> Self { . debug_assert!(idx <= node.len()); -- line 878 ---------------------------------------- -- line 888 ---------------------------------------- . } else { . Err(self) . } . } . . pub(super) fn right_kv( . self, . ) -> Result, marker::KV>, Self> { 3,444 ( 0.00%) if self.idx < self.node.len() { . Ok(unsafe { Handle::new_kv(self.node, self.idx) }) . } else { . Err(self) . } . } . } . . pub(super) enum LeftOrRight { -- line 904 ---------------------------------------- -- line 909 ---------------------------------------- . /// Given an edge index where we want to insert into a node filled to capacity, . /// computes a sensible KV index of a split point and where to perform the insertion. . /// The goal of the split point is for its key and value to end up in a parent node; . /// the keys, values and edges to the left of the split point become the left child; . /// the keys, values and edges to the right of the split point become the right child. . fn splitpoint(edge_idx: usize) -> (usize, LeftOrRight) { . debug_assert!(edge_idx <= CAPACITY); . // Rust issue #74834 tries to explain these symmetric rules. 312 ( 0.00%) match edge_idx { 312 ( 0.00%) 0..EDGE_IDX_LEFT_OF_CENTER => (KV_IDX_CENTER - 1, LeftOrRight::Left(edge_idx)), . EDGE_IDX_LEFT_OF_CENTER => (KV_IDX_CENTER, LeftOrRight::Left(edge_idx)), . EDGE_IDX_RIGHT_OF_CENTER => (KV_IDX_CENTER, LeftOrRight::Right(0)), 101 ( 0.00%) _ => (KV_IDX_CENTER + 1, LeftOrRight::Right(edge_idx - (KV_IDX_CENTER + 1 + 1))), . } . } . . impl<'a, K: 'a, V: 'a> Handle, K, V, marker::Leaf>, marker::Edge> { . /// Inserts a new key-value pair between the key-value pairs to the right and left of . /// this edge. This method assumes that there is enough space in the node for the new . /// pair to fit. . unsafe fn insert_fit( . mut self, . key: K, . val: V, . ) -> Handle, K, V, marker::Leaf>, marker::KV> { . debug_assert!(self.node.len() < CAPACITY); 674 ( 0.00%) let new_len = self.node.len() + 1; . . unsafe { 643 ( 0.00%) slice_insert(self.node.key_area_mut(..new_len), self.idx, key); 3,258 ( 0.00%) slice_insert(self.node.val_area_mut(..new_len), self.idx, val); 674 ( 0.00%) *self.node.len_mut() = new_len as u16; . 2,663 ( 0.00%) Handle::new_kv(self.node, self.idx) . } . } . } . . impl<'a, K: 'a, V: 'a> Handle, K, V, marker::Leaf>, marker::Edge> { . /// Inserts a new key-value pair between the key-value pairs to the right and left of . /// this edge. This method splits the node if there isn't enough room. . /// -- line 950 ---------------------------------------- -- line 954 ---------------------------------------- . self, . key: K, . val: V, . alloc: A, . ) -> ( . Option>, . Handle, marker::KV>, . ) { 674 ( 0.00%) if self.node.len() < CAPACITY { . // SAFETY: There is enough space in the node for insertion. . let handle = unsafe { self.insert_fit(key, val) }; . (None, handle.dormant()) . } else { 92 ( 0.00%) let (middle_kv_idx, insertion) = splitpoint(self.idx); 92 ( 0.00%) let middle = unsafe { Handle::new_kv(self.node, middle_kv_idx) }; . let mut result = middle.split(alloc); 450 ( 0.00%) let insertion_edge = match insertion { . LeftOrRight::Left(insert_idx) => unsafe { . Handle::new_edge(result.left.reborrow_mut(), insert_idx) . }, . LeftOrRight::Right(insert_idx) => unsafe { . Handle::new_edge(result.right.borrow_mut(), insert_idx) . }, . }; . // SAFETY: We just split the node, so there is enough space for . // insertion. . let handle = unsafe { insertion_edge.insert_fit(key, val).dormant() }; 548 ( 0.00%) (Some(result), handle) . } . } . } . . impl<'a, K, V> Handle, K, V, marker::Internal>, marker::Edge> { . /// Fixes the parent pointer and index in the child node that this edge . /// links to. This is useful when the ordering of edges has been changed, . fn correct_parent_link(self) { -- line 989 ---------------------------------------- -- line 997 ---------------------------------------- . . impl<'a, K: 'a, V: 'a> Handle, K, V, marker::Internal>, marker::Edge> { . /// Inserts a new key-value pair and an edge that will go to the right of that new pair . /// between this edge and the key-value pair to the right of this edge. This method assumes . /// that there is enough space in the node for the new pair to fit. . fn insert_fit(&mut self, key: K, val: V, edge: Root) { . debug_assert!(self.node.len() < CAPACITY); . debug_assert!(edge.height == self.node.height - 1); 7 ( 0.00%) let new_len = self.node.len() + 1; . . unsafe { . slice_insert(self.node.key_area_mut(..new_len), self.idx, key); . slice_insert(self.node.val_area_mut(..new_len), self.idx, val); 97 ( 0.00%) slice_insert(self.node.edge_area_mut(..new_len + 1), self.idx + 1, edge.node); 97 ( 0.00%) *self.node.len_mut() = new_len as u16; . . self.node.correct_childrens_parent_links(self.idx + 1..new_len + 1); . } . } . . /// Inserts a new key-value pair and an edge that will go to the right of that new pair . /// between this edge and the key-value pair to the right of this edge. This method splits . /// the node if there isn't enough room. . fn insert( . mut self, . key: K, . val: V, . edge: Root, . alloc: A, . ) -> Option> { 243 ( 0.00%) assert!(edge.height == self.node.height - 1); . 97 ( 0.00%) if self.node.len() < CAPACITY { . self.insert_fit(key, val, edge); . None . } else { . let (middle_kv_idx, insertion) = splitpoint(self.idx); . let middle = unsafe { Handle::new_kv(self.node, middle_kv_idx) }; . let mut result = middle.split(alloc); 18 ( 0.00%) let mut insertion_edge = match insertion { . LeftOrRight::Left(insert_idx) => unsafe { . Handle::new_edge(result.left.reborrow_mut(), insert_idx) . }, . LeftOrRight::Right(insert_idx) => unsafe { . Handle::new_edge(result.right.borrow_mut(), insert_idx) . }, . }; . insertion_edge.insert_fit(key, val, edge); 36 ( 0.00%) Some(result) . } . } . } . . impl<'a, K: 'a, V: 'a> Handle, K, V, marker::Leaf>, marker::Edge> { . /// Inserts a new key-value pair between the key-value pairs to the right and left of . /// this edge. This method splits the node if there isn't enough room, and tries to . /// insert the split off portion into the parent node recursively, until the root is reached. . /// . /// If the returned result is some `SplitResult`, the `left` field will be the root node. . /// The returned pointer points to the inserted value, which in the case of `SplitResult` . /// is in the `left` or `right` tree. 4,865 ( 0.00%) pub(super) fn insert_recursing( . self, . key: K, . value: V, . alloc: A, . split_root: impl FnOnce(SplitResult<'a, K, V, marker::LeafOrInternal>), . ) -> Handle, K, V, marker::Leaf>, marker::KV> { 2,574 ( 0.00%) let (mut split, handle) = match self.insert(key, value, alloc.clone()) { . // SAFETY: we have finished splitting and can now re-awaken the . // handle to the inserted element. . (None, handle) => return unsafe { handle.awaken() }, 204 ( 0.00%) (Some(split), handle) => (split.forget_node_type(), handle), . }; . . loop { . split = match split.left.ascend() { . Ok(parent) => { 360 ( 0.00%) match parent.insert(split.kv.0, split.kv.1, split.right, alloc.clone()) { . // SAFETY: we have finished splitting and can now re-awaken the . // handle to the inserted element. . None => return unsafe { handle.awaken() }, 9 ( 0.00%) Some(split) => split.forget_node_type(), . } . } . Err(root) => { 23 ( 0.00%) split_root(SplitResult { left: root, ..split }); . // SAFETY: we have finished splitting and can now re-awaken the . // handle to the inserted element. . return unsafe { handle.awaken() }; . } . }; . } 5,392 ( 0.00%) } . } . . impl . Handle, marker::Edge> . { . /// Finds the node pointed to by this edge. . /// . /// The method name assumes you picture trees with the root node on top. -- line 1098 ---------------------------------------- -- line 1107 ---------------------------------------- . // We need to use raw pointers to nodes because, if BorrowType is . // marker::ValMut, there might be outstanding mutable references to . // values that we must not invalidate. There's no worry accessing the . // height field because that value is copied. Beware that, once the . // node pointer is dereferenced, we access the edges array with a . // reference (Rust issue #73987) and invalidate any other references . // to or inside the array, should any be around. . let parent_ptr = NodeRef::as_internal_ptr(&self.node); 192 ( 0.00%) let node = unsafe { (*parent_ptr).edges.get_unchecked(self.idx).assume_init_read() }; . NodeRef { node, height: self.node.height - 1, _marker: PhantomData } . } . } . . impl<'a, K: 'a, V: 'a, NodeType> Handle, K, V, NodeType>, marker::KV> { . pub(super) fn into_kv(self) -> (&'a K, &'a V) { . debug_assert!(self.idx < self.node.len()); . let leaf = self.node.into_leaf(); -- line 1123 ---------------------------------------- -- line 1176 ---------------------------------------- . impl Handle, marker::KV> { . /// Extracts the key and value that the KV handle refers to. . /// # Safety . /// The node that the handle refers to must not yet have been deallocated. . pub(super) unsafe fn into_key_val(mut self) -> (K, V) { . debug_assert!(self.idx < self.node.len()); . let leaf = self.node.as_leaf_dying(); . unsafe { 81 ( 0.00%) let key = leaf.keys.get_unchecked_mut(self.idx).assume_init_read(); . let val = leaf.vals.get_unchecked_mut(self.idx).assume_init_read(); . (key, val) . } . } . . /// Drops the key and value that the KV handle refers to. . /// # Safety . /// The node that the handle refers to must not yet have been deallocated. -- line 1192 ---------------------------------------- -- line 1216 ---------------------------------------- . } . . impl<'a, K: 'a, V: 'a, NodeType> Handle, K, V, NodeType>, marker::KV> { . /// Helps implementations of `split` for a particular `NodeType`, . /// by taking care of leaf data. . fn split_leaf_data(&mut self, new_node: &mut LeafNode) -> (K, V) { . debug_assert!(self.idx < self.node.len()); . let old_len = self.node.len(); 303 ( 0.00%) let new_len = old_len - self.idx - 1; 101 ( 0.00%) new_node.len = new_len as u16; . unsafe { . let k = self.node.key_area_mut(self.idx).assume_init_read(); . let v = self.node.val_area_mut(self.idx).assume_init_read(); . . move_to_slice( 8 ( 0.00%) self.node.key_area_mut(self.idx + 1..old_len), 101 ( 0.00%) &mut new_node.keys[..new_len], . ); . move_to_slice( . self.node.val_area_mut(self.idx + 1..old_len), 101 ( 0.00%) &mut new_node.vals[..new_len], . ); . 175 ( 0.00%) *self.node.len_mut() = self.idx as u16; 138 ( 0.00%) (k, v) . } . } . } . . impl<'a, K: 'a, V: 'a> Handle, K, V, marker::Leaf>, marker::KV> { . /// Splits the underlying node into three parts: . /// . /// - The node is truncated to only contain the key-value pairs to the left of -- line 1248 ---------------------------------------- -- line 1288 ---------------------------------------- . pub(super) fn split( . mut self, . alloc: A, . ) -> SplitResult<'a, K, V, marker::Internal> { . let old_len = self.node.len(); . unsafe { . let mut new_node = InternalNode::new(alloc); . let kv = self.split_leaf_data(&mut new_node.data); 18 ( 0.00%) let new_len = usize::from(new_node.data.len); . move_to_slice( . self.node.edge_area_mut(self.idx + 1..old_len + 1), 9 ( 0.00%) &mut new_node.edges[..new_len + 1], . ); . . // SAFETY: self is `marker::Internal`, so `self.node.height` is positive . let height = NonZero::new_unchecked(self.node.height); . let right = NodeRef::from_new_internal(new_node, height); . . SplitResult { left: self.node, kv, right } . } -- line 1307 ---------------------------------------- -- line 1819 ---------------------------------------- . /// . /// # Safety . /// The slice has more than `idx` elements. . unsafe fn slice_insert(slice: &mut [MaybeUninit], idx: usize, val: T) { . unsafe { . let len = slice.len(); . debug_assert!(len > idx); . let slice_ptr = slice.as_mut_ptr(); 2,797 ( 0.00%) if len > idx + 1 { 110 ( 0.00%) ptr::copy(slice_ptr.add(idx), slice_ptr.add(idx + 1), len - idx - 1); . } . (*slice_ptr.add(idx)).write(val); . } . } . . /// Removes and returns a value from a slice of all initialized elements, leaving behind one . /// trailing uninitialized element. . /// -- line 1836 ---------------------------------------- -- line 1868 ---------------------------------------- . ptr::copy(slice_ptr, slice_ptr.add(distance), slice.len() - distance); . } . } . . /// Moves all values from a slice of initialized elements to a slice . /// of uninitialized elements, leaving behind `src` as all uninitialized. . /// Works like `dst.copy_from_slice(src)` but does not require `T` to be `Copy`. . fn move_to_slice(src: &mut [MaybeUninit], dst: &mut [MaybeUninit]) { 18 ( 0.00%) assert!(src.len() == dst.len()); . unsafe { . ptr::copy_nonoverlapping(src.as_ptr(), dst.as_mut_ptr(), src.len()); . } . } . . #[cfg(test)] . mod tests; 6,212 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs -------------------------------------------------------------------------------- Ir -- line 86 ---------------------------------------- . } . . /// A "Path" is essentially Rust's notion of a name. . /// . /// It's represented as a sequence of identifiers, . /// along with a bunch of supporting information. . /// . /// E.g., `std::cmp::PartialEq`. 3,792 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub struct Path { . pub span: Span, . /// The segments in the path: the things separated by `::`. . /// Global paths begin with `kw::PathRoot`. . pub segments: ThinVec, . } . . // Succeeds if the path has a single segment that is arg-free and matches the given symbol. . impl PartialEq for Path { . #[inline] . fn eq(&self, name: &Symbol) -> bool { 680 ( 0.00%) if let [segment] = self.segments.as_ref() . && segment == name . { . true . } else { . false . } . } . } -- line 114 ---------------------------------------- -- line 203 ---------------------------------------- . s.push_str(&ident.to_string()); . } . s . } . . /// A segment of a path: an identifier, an optional lifetime, and a set of types. . /// . /// E.g., `std`, `String` or `Box`. 404 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub struct PathSegment { . /// The identifier portion of this path segment. . pub ident: Ident, . 62 ( 0.00%) pub id: NodeId, . . /// Type/lifetime parameters attached to this path. They come in . /// two flavors: `Path` and `Path(A,B) -> C`. . /// `None` means that no parameter list is supplied (`Path`), . /// `Some` means that parameter list is supplied (`Path`) . /// but it can be empty (`Path<>`). . /// `Box` is used as a size optimization for the common case with no parameters. . pub args: Option>, . } . . // Succeeds if the path segment is arg-free and matches the given symbol. . impl PartialEq for PathSegment { . #[inline] . fn eq(&self, name: &Symbol) -> bool { 170 ( 0.00%) self.args.is_none() && self.ident.name == *name . } . } . . impl PathSegment { . pub fn from_ident(ident: Ident) -> Self { . PathSegment { ident, id: DUMMY_NODE_ID, args: None } . } . -- line 239 ---------------------------------------- -- line 247 ---------------------------------------- . None => self.ident.span, . } . } . } . . /// The generic arguments and associated item constraints of a path segment. . /// . /// E.g., `` as in `Foo` or `(A, B)` as in `Foo(A, B)`. 4,301 ( 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. 940 ( 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. 1,128 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] 8,037 ( 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 (170x) 114 ( 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 (3x) . pub enum AngleBracketedArg { . /// A generic argument for a generic parameter. . Arg(GenericArg), . /// A constraint on an associated item. . Constraint(AssocItemConstraint), . } . . impl AngleBracketedArg { -- line 318 ---------------------------------------- -- line 393 ---------------------------------------- . Trait(PolyTraitRef), . Outlives(#[visitable(extra = LifetimeCtxt::Bound)] Lifetime), . /// Precise capturing syntax: `impl Sized + use<'a>` . Use(ThinVec, Span), . } . . impl GenericBound { . pub fn span(&self) -> Span { 336 ( 0.00%) match self { . GenericBound::Trait(t, ..) => t.span, . GenericBound::Outlives(l) => l.ident.span, . GenericBound::Use(_, span) => *span, . } . } . } . . pub type GenericBounds = ThinVec; -- line 409 ---------------------------------------- -- line 616 ---------------------------------------- . /// Distinguishes between `unsafe { ... }` and `{ ... }`. . pub rules: BlockCheckMode, . pub span: Span, . } . . /// A match pattern. . /// . /// Patterns appear in match statements and some other contexts, such as `let` and `if let`. 109,191 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] 402,630 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:::clone (1,059x) . pub struct Pat { 16 ( 0.00%) pub id: NodeId, 48 ( 0.00%) pub kind: PatKind, 1,493 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:::clone'2 (16x) . pub span: Span, . } . . impl Pat { . /// Attempt reparsing the pattern as a type. . /// This is intended for use by diagnostics. . pub fn to_ty(&self) -> Option> { . let kind = match &self.kind { -- line 635 ---------------------------------------- -- line 712 ---------------------------------------- . while let PatKind::Ref(inner, _, _) = ¤t.kind { . current = inner; . } . current . } . . /// Is this a `..` pattern? . pub fn is_rest(&self) -> bool { 1,204 ( 0.00%) matches!(self.kind, PatKind::Rest) . } . . /// Whether this could be a never pattern, taking into account that a macro invocation can . /// return a never pattern. Used to inform errors during parsing. . pub fn could_be_never_pattern(&self) -> bool { . let mut could_be_never_pattern = false; . self.walk(&mut |pat| match &pat.kind { . PatKind::Never | PatKind::MacCall(_) => { -- line 728 ---------------------------------------- -- line 771 ---------------------------------------- . } . } . . /// A single field in a struct pattern. . /// . /// Patterns like the fields of `Foo { x, ref y, ref mut z }` . /// are treated the same as `x: x, y: ref y, z: ref mut z`, . /// except when `is_shorthand` is true. 7,293 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub struct PatField { . /// The identifier for the field. . pub ident: Ident, . /// The pattern the field is destructured to. . pub pat: Box, . pub is_shorthand: bool, . pub attrs: AttrVec, . pub id: NodeId, . pub span: Span, . pub is_placeholder: bool, . } . 2,393 ( 0.00%) #[derive(Clone, Copy, Debug, Eq, PartialEq)] . #[derive(Encodable, Decodable, StableHash, Walkable)] . pub enum ByRef { . Yes(Pinnedness, Mutability), . No, . } . . impl ByRef { . #[must_use] -- line 800 ---------------------------------------- -- line 807 ---------------------------------------- . } . . /// The mode of a binding (`mut`, `ref mut`, etc). . /// . /// Used for both the explicit binding annotations given in the HIR for a binding . /// and the final binding mode that we infer after type inference/match ergonomics. . /// `.0` is the by-reference mode (`ref`, `ref mut`, or by value), . /// `.1` is the mutability of the binding. 9 ( 0.00%) #[derive(Clone, Copy, Debug, Eq, PartialEq)] . #[derive(Encodable, Decodable, StableHash, Walkable)] . pub struct BindingMode(pub ByRef, pub Mutability); . . impl BindingMode { . pub const NONE: Self = Self(ByRef::No, Mutability::Not); . pub const REF: Self = Self(ByRef::Yes(Pinnedness::Not, Mutability::Not), Mutability::Not); . pub const REF_PIN: Self = . Self(ByRef::Yes(Pinnedness::Pinned, Mutability::Not), Mutability::Not); -- line 823 ---------------------------------------- -- 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`. 97,882 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] 493 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/mut_visit.rs:>::walk_mut (17x) . pub enum PatKind { . /// A missing pattern, e.g. for an anonymous param in a bare fn like `fn f(u32)`. . Missing, . . /// Represents a wildcard pattern (`_`). . Wild, . . /// A `PatKind::Ident` may either be a new bound variable (`ref mut binding @ OPT_SUBPATTERN`), . /// or a unit struct/variant pattern, or a const pattern (in the last two cases the third . /// field must be `None`). Disambiguation cannot be done with parser alone, so it happens . /// during name resolution. 24 ( 0.00%) Ident(BindingMode, Ident, Option>), . . /// A struct or struct variant pattern (e.g., `Variant {x, y, ..}`). 257 ( 0.00%) Struct(Option>, Path, ThinVec, PatFieldsRest), . . /// A tuple struct/variant pattern (`Variant(x, y, .., z)`). 567 ( 0.00%) TupleStruct(Option>, Path, ThinVec), . . /// An or-pattern `A | B | C`. . /// Invariant: `pats.len() >= 2`. . Or(ThinVec), . . /// A possibly qualified path pattern. . /// Unqualified path patterns `A::B::C` can legally refer to variants, structs, constants . /// or associated constants. Qualified path patterns `::B::C`/`::B::C` can -- line 897 ---------------------------------------- -- line 945 ---------------------------------------- . /// A macro pattern; pre-expansion. . MacCall(Box), . . /// Placeholder for a pattern that wasn't syntactically well formed in some way. . Err(ErrorGuaranteed), . } . . /// Whether the `..` is present in a struct fields pattern. 1,028 ( 0.00%) #[derive(Clone, Copy, Encodable, Decodable, Debug, PartialEq, Walkable)] . pub enum PatFieldsRest { . /// `module::StructName { field, ..}` . Rest(Span), . /// `module::StructName { field, syntax error }` . Recovered(ErrorGuaranteed), . /// `module::StructName { field }` . None, . } . . /// The kind of borrow in an `AddrOf` expression, . /// e.g., `&place` or `&raw const place`. 330 ( 0.00%) #[derive(Clone, Copy, PartialEq, Eq, Debug)] . #[derive(Encodable, Decodable, StableHash, Walkable)] . pub enum BorrowKind { . /// A normal borrow, `&$expr` or `&mut $expr`. . /// The resulting type is either `&'a T` or `&'a mut T` . /// where `T = typeof($expr)` and `'a` is some lifetime. . Ref, . /// A raw borrow, `&raw const $expr` or `&raw mut $expr`. . /// The resulting type is either `*const T` or `*mut T` -- line 973 ---------------------------------------- -- line 974 ---------------------------------------- . /// where `T = typeof($expr)`. . Raw, . /// A pinned borrow, `&pin const $expr` or `&pin mut $expr`. . /// The resulting type is either `Pin<&'a T>` or `Pin<&'a mut T>` . /// where `T = typeof($expr)` and `'a` is some lifetime. . Pin, . } . 30,510 ( 0.00%) #[derive(Clone, Copy, Debug, PartialEq, Encodable, Decodable, StableHash, Walkable)] . pub enum BinOpKind { . /// The `+` operator (addition) . Add, . /// The `-` operator (subtraction) . Sub, . /// The `*` operator (multiplication) . Mul, . /// The `/` operator (division) -- line 990 ---------------------------------------- -- line 1017 ---------------------------------------- . Ge, . /// The `>` operator (greater than) . Gt, . } . . impl BinOpKind { . pub fn as_str(&self) -> &'static str { . use BinOpKind::*; 411 ( 0.00%) match self { . Add => "+", . Sub => "-", . Mul => "*", . Div => "/", . Rem => "%", . And => "&&", . Or => "||", . BitXor => "^", -- line 1033 ---------------------------------------- -- line 1037 ---------------------------------------- . Shr => ">>", . Eq => "==", . Lt => "<", . Le => "<=", . Ne => "!=", . Ge => ">=", . Gt => ">", . } 1 ( 0.00%) } . . pub fn is_lazy(&self) -> bool { . matches!(self, BinOpKind::And | BinOpKind::Or) . } . . pub fn precedence(&self) -> ExprPrecedence { . use BinOpKind::*; . match *self { -- line 1053 ---------------------------------------- -- line 1070 ---------------------------------------- . Add | Sub | Mul | Div | Rem | And | Or | BitXor | BitAnd | BitOr | Shl | Shr => { . Fixity::Left . } . } . } . . pub fn is_comparison(self) -> bool { . use BinOpKind::*; 9,790 ( 0.00%) match self { . Eq | Ne | Lt | Le | Gt | Ge => true, . Add | Sub | Mul | Div | Rem | And | Or | BitXor | BitAnd | BitOr | Shl | Shr => false, . } . } . . /// Returns `true` if the binary operator takes its arguments by value. . pub fn is_by_value(self) -> bool { . !self.is_comparison() -- line 1086 ---------------------------------------- -- line 1089 ---------------------------------------- . . pub type BinOp = Spanned; . . // Sometimes `BinOpKind` and `AssignOpKind` need the same treatment. The . // operations covered by `AssignOpKind` are a subset of those covered by . // `BinOpKind`, so it makes sense to convert `AssignOpKind` to `BinOpKind`. . impl From for BinOpKind { . fn from(op: AssignOpKind) -> BinOpKind { 330 ( 0.00%) match op { . AssignOpKind::AddAssign => BinOpKind::Add, . AssignOpKind::SubAssign => BinOpKind::Sub, . AssignOpKind::MulAssign => BinOpKind::Mul, . AssignOpKind::DivAssign => BinOpKind::Div, . AssignOpKind::RemAssign => BinOpKind::Rem, . AssignOpKind::BitXorAssign => BinOpKind::BitXor, . AssignOpKind::BitAndAssign => BinOpKind::BitAnd, . AssignOpKind::BitOrAssign => BinOpKind::BitOr, . AssignOpKind::ShlAssign => BinOpKind::Shl, . AssignOpKind::ShrAssign => BinOpKind::Shr, . } . } . } . 21 ( 0.00%) #[derive(Clone, Copy, Debug, PartialEq, Encodable, Decodable, StableHash, Walkable)] . pub enum AssignOpKind { . /// The `+=` operator (addition) . AddAssign, . /// The `-=` operator (subtraction) . SubAssign, . /// The `*=` operator (multiplication) . MulAssign, . /// The `/=` operator (division) -- line 1120 ---------------------------------------- -- line 1156 ---------------------------------------- . } . } . . pub type AssignOp = Spanned; . . /// Unary operator. . /// . /// Note that `&data` is not an operator, it's an `AddrOf` expression. 1,040 ( 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, . } . . impl UnOp { . pub fn as_str(&self) -> &'static str { 4 ( 0.00%) match self { . UnOp::Deref => "*", . UnOp::Not => "!", . UnOp::Neg => "-", . } . } . . /// Returns `true` if the unary operator takes its argument by value. . pub fn is_by_value(self) -> bool { -- line 1184 ---------------------------------------- -- 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>)> { 7,804 ( 0.00%) match self { . Self::Decl => None, 1,559 ( 0.00%) Self::Init(init) => Some((init, None)), . Self::InitElse(init, els) => Some((init, Some(els))), . } . } . } . . /// An arm of a 'match'. . /// . /// E.g., `0..=10 => { println!("match!") }` as in -- line 1336 ---------------------------------------- -- line 1388 ---------------------------------------- . /// explicit discriminant values for enum variants. . #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub struct AnonConst { . pub id: NodeId, . pub value: Box, . } . . /// An expression. 7,825 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug)] . pub struct Expr { 313 ( 0.00%) pub id: NodeId, . pub kind: ExprKind, . pub span: Span, . pub attrs: AttrVec, . pub tokens: Option, . } . . impl Expr { . /// Check if this expression is potentially a trivial const arg, i.e., one that can _potentially_ -- line 1406 ---------------------------------------- -- line 1474 ---------------------------------------- . Parens::No, . ))), . _ => None, . } . } . . pub fn peel_parens(&self) -> &Expr { . let mut expr = self; 576 ( 0.00%) while let ExprKind::Paren(inner) = &expr.kind { 4 ( 0.00%) expr = inner; . } . expr . } . . pub fn peel_parens_and_refs(&self) -> &Expr { . let mut expr = self; . while let ExprKind::Paren(inner) | ExprKind::AddrOf(BorrowKind::Ref, _, inner) = &expr.kind . { -- line 1491 ---------------------------------------- -- line 1699 ---------------------------------------- . match self { . RangeLimits::HalfOpen => "..", . RangeLimits::Closed => "..=", . } . } . } . . /// A method call (e.g. `x.foo::(a, b, c)`). 248 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug)] . pub struct MethodCall { . /// The method name and its generic arguments, e.g. `foo::`. . pub seg: PathSegment, . /// The receiver, e.g. `x`. 62 ( 0.00%) 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, . } . 786 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug, Walkable)] . pub enum StructRest { . /// `..x`. . Base(Box), . /// `..`. . Rest(Span), . /// No trailing `..` or expression. . None, . /// No trailing `..` or expression, and also, a parse error occurred inside the struct braces. -- line 1728 ---------------------------------------- -- line 1737 ---------------------------------------- . pub struct StructExpr { . pub qself: Option>, . pub path: Path, . pub fields: ThinVec, . pub rest: StructRest, . } . . // Adding a new variant? Please update `test_expr` in `tests/ui/macros/stringify.rs`. 2,931 ( 0.00%) #[derive(Clone, Encodable, Decodable, Debug)] . pub enum ExprKind { . /// An array (e.g, `[a, b, c, d]`). . Array(ThinVec>), . /// Allow anonymous constants from an inline `const` block. . ConstBlock(AnonConst), . /// A function call. . /// . /// The first field resolves to the function itself, . /// and the second field is the list of arguments. . /// This also represents calling the constructor of . /// tuple-like ADTs such as tuple structs and enum variants. 90 ( 0.00%) Call(Box, ThinVec>), 3,886 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs: as core::clone::Clone>::clone (17x) . /// A method call (e.g., `x.foo::(a, b, c)`). 124 ( 0.00%) MethodCall(Box), 24,615 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs: as core::clone::Clone>::clone (60x) . /// A tuple (e.g., `(a, b, c, d)`). . Tup(ThinVec>), . /// A binary operation (e.g., `a + b`, `a * b`). 6 ( 0.00%) Binary(BinOp, Box, Box), 325 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs: as core::clone::Clone>::clone (2x) . /// A unary operation (e.g., `!x`, `*x`). . Unary(UnOp, Box), . /// A `move(expr)` expression. . Move(Box, Span), . /// A literal (e.g., `1`, `"foo"`). . Lit(token::Lit), . /// A cast (e.g., `foo as f64`). . Cast(Box, Box), -- line 1771 ---------------------------------------- -- line 1829 ---------------------------------------- . /// An assignment (`a = foo()`). . /// The `Span` argument is the span of the `=` token. . Assign(Box, Box, Span), . /// An assignment with an operator. . /// . /// E.g., `a += 1`. . AssignOp(AssignOp, Box, Box), . /// Access of a named (e.g., `obj.foo`) or unnamed (e.g., `obj.0`) struct field. 44 ( 0.00%) Field(Box, Ident), 3,569 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs: as core::clone::Clone>::clone (13x) . /// An indexing operation (e.g., `foo[2]`). . /// The span represents the span of the `[2]`, including brackets. . Index(Box, Box, Span), . /// A range (e.g., `1..2`, `1..`, `..2`, `1..=2`, `..=2`; and `..` in destructuring assignment). . Range(Option>, Option>, RangeLimits), . /// An underscore, used in destructuring assignment to ignore a value. . Underscore, . . /// Variable reference, possibly containing `::` and/or type . /// parameters (e.g., `foo::bar::`). . /// . /// Optionally "qualified" (e.g., ` as SomeTrait>::SomeType`). 205 ( 0.00%) Path(Option>, Path), . . /// A referencing operation (`&a`, `&mut a`, `&raw const a` or `&raw mut a`). . AddrOf(BorrowKind, Mutability, Box), . /// A `break`, with an optional label to break, and an optional expression. . Break(Option

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

{ . #[inline] . pub fn new bool>(is_active: &F, pass: P) -> Self { 70 ( 0.00%) let active = is_active(&pass.get_lints()); 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),* $(,)?)) => { 32,125,667 ( 0.88%) if $self.$field.active { 27,322,189 ( 0.75%) rustc_lint::LateLintPass::$name(&mut $self.$field.pass, $($arg),*); 70,176,230 ( 1.93%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/mod.rs:::check_impl_item (2,503x) 8,385,299 ( 0.23%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/lifetimes.rs:::check_impl_item (2,503x) 6,761,091 ( 0.19%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/mod.rs:::check_impl_item (2,503x) 2,732,244 ( 0.08%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/extra_unused_type_parameters.rs:::check_impl_item (2,503x) 603,635 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/self_named_constructors.rs:::check_impl_item (2,503x) 386,150 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/utils/dump_hir.rs:::check_impl_item (2,503x) 179,848 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/inherent_to_string.rs:::check_impl_item (2,503x) 71,922 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/non_copy_const.rs:::check_impl_item (2,503x) 60,337 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/len_without_is_empty.rs:::check_impl_item (2,503x) 60,020 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/types/mod.rs:::check_impl_item (2,503x) . } . }; . } . . /// 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),*);)*]) => ( 2,825,342 ( 0.08%) $(#[inline(always)] fn $name(&mut self, cx: &rustc_lint::LateContext<'tcx>, $($param: $arg),*) { . $crate::expand_combined_late_lint_pass_method!($fields, self, $name, (cx, $($param),*)); 1,646,362 ( 0.05%) })* . ) . } . . /// Declare the combined struct (one [`Gated`] field per pass) plus its . /// `LintPass`/`LateLintPass` impls. The method list comes from . /// `rustc_lint::late_lint_methods!` so it can't drift from rustc's. . /// . /// Each entry is `Field: Type = constructor`; `new`'s params (`tcx`, `conf`, ...) -- line 68 ---------------------------------------- -- line 74 ---------------------------------------- . $methods:tt . ) => { . #[allow(non_snake_case)] . pub struct $name<'tcx> { . $($field: $crate::combined_late_pass::Gated<$fty>,)* . } . . impl<'tcx> $name<'tcx> { 17 ( 0.00%) pub fn new bool>($($pname: $pty,)* is_active: &F) -> Self { 55 ( 0.00%) Self { 9 ( 0.00%) $($field: $crate::combined_late_pass::Gated::new(is_active, $ctor),)* . } 8 ( 0.00%) } . } . . #[allow(rustc::lint_pass_impl_without_macro)] . impl<'tcx> rustc_lint::LintPass for $name<'tcx> { . fn name(&self) -> &'static str { . stringify!($name) . } 10 ( 0.00%) fn get_lints(&self) -> rustc_lint::LintVec { 1 ( 0.00%) => ???:std::exception::~exception() (1x) . // Reserve at least one slot per pass up front to skip the early reallocations. . let mut lints = Vec::with_capacity([$(stringify!($field)),*].len()); 3 ( 0.00%) $(lints.extend(self.$field.pass.get_lints());)* 2,184 ( 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); . } . }; . } 469,406 ( 0.01%) -------------------------------------------------------------------------------- -- 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; . } . 2,267 ( 0.00%) let mut cc = 1u64; 2,267 ( 0.00%) let mut returns = 0u64; 2,267 ( 0.00%) let mut prev_expr: Option<&ExprKind<'tcx>> = None; . let _: Option = for_each_expr_without_closures(expr, |e| { 516,844 ( 0.01%) match e.kind { . ExprKind::If(_, _, _) => { . cc += 1; . }, 2,644 ( 0.00%) ExprKind::Match(_, arms, _) => { 2,644 ( 0.00%) if arms.len() > 1 { 2,208 ( 0.00%) cc += 1; . } . cc += arms.iter().filter(|arm| arm.guard.is_some()).count() as u64; . }, 8,267 ( 0.00%) ExprKind::Ret(_) if !matches!(prev_expr, Some(ExprKind::Ret(_))) => { 1,181 ( 0.00%) returns += 1; . }, . _ => {}, . } 108,666 ( 0.00%) prev_expr = Some(&e.kind); . ControlFlow::Continue(()) . }); . 6,801 ( 0.00%) let ret_ty = cx.typeck_results().node_type(expr.hir_id); 92,995 ( 0.00%) => ???:::node_type (2,267x) 2,736 ( 0.00%) let ret_adjust = if ret_ty.is_diag_item(cx, sym::Result) { 475 ( 0.00%) returns . } else { . #[expect(clippy::integer_division)] 3,584 ( 0.00%) (returns / 2) . }; . . // prevent degenerate cases where unreachable code contains `return` statements 11,335 ( 0.00%) if cc >= ret_adjust { 4,534 ( 0.00%) cc -= ret_adjust; . } . 4,534 ( 0.00%) if cc > self.limit.limit() { 4 ( 0.00%) let fn_span = match kind { . FnKind::ItemFn(ident, _, _) | FnKind::Method(ident, _) => ident.span, . FnKind::Closure => { . let header_span = body_span.with_hi(decl.output.span().lo()); . if let Some(range) = header_span.map_range(cx, |_, src, range| { . let mut idxs = src.get(range.clone())?.match_indices('|'); . Some(range.start + idxs.next()?.0..range.start + idxs.next()?.0 + 1) . }) { . range.with_ctxt(header_span.ctxt()) -- line 115 ---------------------------------------- -- line 118 ---------------------------------------- . } . }, . }; . . span_lint_and_help( . cx, . COGNITIVE_COMPLEXITY, . fn_span, 14 ( 0.00%) format!( . "the function has a cognitive complexity of ({cc}/{})", . self.limit.limit() . ), 2 ( 0.00%) None, . "you could split it up into multiple smaller functions", . ); . } . } . } . . impl<'tcx> LateLintPass<'tcx> for CognitiveComplexity { 42,315 ( 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)] 2,821 ( 0.00%) if cx.tcx.get_attrs(def_id, sym::test).next().is_none() { 31,031 ( 0.00%) let expr = if kind.asyncness().is_async() { 28,036 ( 0.00%) => ???:::asyncness (2,821x) . match get_async_fn_body(cx.tcx, body) { . Some(b) => b, . None => { . return; . }, . } . } else { 2,821 ( 0.00%) body.value . }; . 14,105 ( 0.00%) self.check(cx, kind, decl, expr, span); . } 22,568 ( 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 ---------------------------------------- 70,372 ( 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // (x % c + c) % c 124,292 ( 0.00%) if let ExprKind::Binary(rem_op, rem_lhs, rem_rhs) = expr.kind 1,690 ( 0.00%) && rem_op.node == BinOpKind::Rem 52 ( 0.00%) && let ExprKind::Binary(add_op, add_lhs, add_rhs) = rem_lhs.kind . && add_op.node == BinOpKind::Add . && let ctxt = expr.span.ctxt() . && rem_lhs.span.ctxt() == ctxt . && rem_rhs.span.ctxt() == ctxt . && add_lhs.span.ctxt() == ctxt . && add_rhs.span.ctxt() == ctxt . && !expr.span.in_external_macro(cx.sess().source_map()) . && let Some(const1) = check_for_unsigned_int_constant(cx, ctxt, rem_rhs) -- line 63 ---------------------------------------- -- line 93 ---------------------------------------- . MANUAL_REM_EUCLID, . expr.span, . "manual `rem_euclid` implementation", . "consider using", . format!("{rem_of}.rem_euclid({const1})"), . app, . ); . } 497,168 ( 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 ---------------------------------------- 26 ( 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 141,251 ( 0.00%) if let ExprKind::Call(box_from_raw, [arg]) = expr.kind 19,105 ( 0.00%) && let ExprKind::Path(QPath::TypeRelative(ty, seg)) = box_from_raw.kind 963 ( 0.00%) && seg.ident.name == sym::from_raw 6 ( 0.00%) && let Some(type_str) = ty.basic_res().opt_def_id().and_then(|id| def_id_matches_type(cx, id)) 4 ( 0.00%) && let arg_kind = cx.typeck_results().expr_ty(arg).kind() 80 ( 0.00%) => ???:::expr_ty (2x) 4 ( 0.00%) && let ty::RawPtr(ty, _) = arg_kind 10 ( 0.00%) && is_c_void(cx, *ty) 8 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_c_void (2x) . { . 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", . ); . } 497,168 ( 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 6 ( 0.00%) if Some(def_id) == cx.tcx.lang_items().owned_box() { 80 ( 0.00%) => ???:::lang_items (2x) . return Some("Box"); . } . . if let Some(symbol) = cx.tcx.get_diagnostic_name(def_id) { . if symbol == sym::Arc { . return Some("Arc"); . } else if symbol == sym::Rc { . return Some("Rc"); -- line 76 ---------------------------------------- 10 ( 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 { 16,143 ( 0.00%) Self { . cx, 5,888 ( 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 { 10,245 ( 0.00%) Self { . allow_side_effects: false, . ..self . } . } . . /// Check paths by their resolution instead of exact equality. See [`PathCheck`] for more . /// details. . #[must_use] . pub fn paths_by_resolution(self) -> Self { 120 ( 0.00%) Self { . path_check: PathCheck::Resolution, . ..self . } . } . . #[must_use] . pub fn expr_fallback( . self, -- line 100 ---------------------------------------- -- line 103 ---------------------------------------- . Self { . expr_fallback: Some(Box::new(expr_fallback)), . ..self . } . } . . /// Use this method to wrap comparisons that may involve inter-expression context. . /// See `self.locals`. 175 ( 0.00%) pub fn inter_expr(&mut self, ctxt: SyntaxContext) -> HirEqInterExpr<'_, 'a, 'tcx> { 78,110 ( 0.00%) HirEqInterExpr { . inner: self, . eval_ctxt: ctxt, . prev_left_ctxt: ctxt, . prev_right_ctxt: ctxt, . locals: HirIdMap::default(), . local_items: FxIndexMap::default(), . } 175 ( 0.00%) } . 560 ( 0.00%) pub fn eq_block(&mut self, ctxt: SyntaxContext, left: &Block<'_>, right: &Block<'_>) -> bool { 1,680 ( 0.00%) self.inter_expr(ctxt).eq_block(left, right) 377,825 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_block (280x) 4,480 ( 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:: (280x) 1,120 ( 0.00%) } . 4,202 ( 0.00%) pub fn eq_expr(&mut self, ctxt: SyntaxContext, left: &Expr<'_>, right: &Expr<'_>) -> bool { 24,900 ( 0.00%) self.inter_expr(ctxt).eq_expr(left, right) 5,259,820 ( 0.14%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (2,101x) 44,445 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue:: (2,101x) 8,404 ( 0.00%) } . . pub fn eq_path(&mut self, ctxt: SyntaxContext, left: &Path<'_>, right: &Path<'_>) -> bool { . self.inter_expr(ctxt).eq_path(left, right) . } . . pub fn eq_path_segment(&mut self, ctxt: SyntaxContext, left: &PathSegment<'_>, right: &PathSegment<'_>) -> bool { . self.inter_expr(ctxt).eq_path_segment(left, right) . } -- line 136 ---------------------------------------- -- line 164 ---------------------------------------- . // right. For example, when comparing `{ let x = 1; x + 2 }` and `{ let y = 1; y + 2 }`, . // these blocks are considered equal since `x` is mapped to `y`. . pub locals: HirIdMap, . pub local_items: FxIndexMap, . } . . impl HirEqInterExpr<'_, '_, '_> { . pub fn set_eval_ctxt(&mut self, ctxt: SyntaxContext) { 41 ( 0.00%) self.eval_ctxt = ctxt; . self.prev_left_ctxt = ctxt; 42 ( 0.00%) self.prev_right_ctxt = ctxt; . } . 1,200 ( 0.00%) pub fn eq_stmt(&mut self, left: &Stmt<'_>, right: &Stmt<'_>) -> bool { 480 ( 0.00%) if self.check_ctxt(left.span.ctxt(), right.span.ctxt()) == Some(false) { 3,500 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::check_ctxt (120x) . return false; . } . 676 ( 0.00%) match (&left.kind, &right.kind) { . (StmtKind::Let(l), StmtKind::Let(r)) => { . // This additional check ensures that the type of the locals are equivalent even if the init . // expression or type have some inferred parts. 25 ( 0.00%) if let Some((typeck_lhs, typeck_rhs)) = self.inner.maybe_typeck_results { 25 ( 0.00%) let l_ty = typeck_lhs.pat_ty(l.pat); 200 ( 0.00%) => ???:::pat_ty (5x) 20 ( 0.00%) let r_ty = typeck_rhs.pat_ty(r.pat); 200 ( 0.00%) => ???:::pat_ty (5x) 8 ( 0.00%) if l_ty != r_ty { . return false; . } . } . . // eq_pat adds the HirIds to the locals map. We therefore call it last to make sure that . // these only get added if the init and type is equal. 13 ( 0.00%) both(l.init.as_ref(), r.init.as_ref(), |l, r| self.eq_expr(l, r)) 1,209 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (1x) 3,161 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (2x) 2 ( 0.00%) && both(l.ty.as_ref(), r.ty.as_ref(), |l, r| self.eq_ty(l, r)) 4 ( 0.00%) && both(l.els.as_ref(), r.els.as_ref(), |l, r| self.eq_block(l, r)) 22 ( 0.00%) && self.eq_pat(l.pat, r.pat) 619 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_pat (2x) . }, 1,122 ( 0.00%) (StmtKind::Expr(l), StmtKind::Expr(r)) | (StmtKind::Semi(l), StmtKind::Semi(r)) => self.eq_expr(l, r), 230,022 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (96x) 10,319 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (6x) . (StmtKind::Item(l), StmtKind::Item(r)) => self.eq_item(*l, *r), . _ => false, . } 144 ( 0.00%) } . . pub fn eq_item(&mut self, l: ItemId, r: ItemId) -> bool { . let left = self.inner.cx.tcx.hir_item(l); . let right = self.inner.cx.tcx.hir_item(r); . let eq = match (left.kind, right.kind) { . ( . ItemKind::Const(l_ident, l_generics, l_ty, ConstItemRhs::Body(l_body)), . ItemKind::Const(r_ident, r_generics, r_ty, ConstItemRhs::Body(r_body)), -- line 213 ---------------------------------------- -- line 379 ---------------------------------------- . default: r_default, . }, . ) => self.eq_ty(l_ty, r_ty) && both(*l_default, *r_default, |l, r| self.eq_const_arg(l, r)), . _ => false, . } . } . . /// Checks whether two blocks are the same. 2,016 ( 0.00%) fn eq_block(&mut self, left: &Block<'_>, right: &Block<'_>) -> bool { . use TokenKind::{Semi, Whitespace}; 864 ( 0.00%) if left.stmts.len() != right.stmts.len() { . return false; . } 985 ( 0.00%) let lspan = left.span.data(); 985 ( 0.00%) let rspan = right.span.data(); 2,167 ( 0.00%) match self.check_ctxt(lspan.ctxt, rspan.ctxt) { 5,626 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::check_ctxt (194x) . Some(false) => return false, 394 ( 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| { . self.eq_expr(left, right) . }); . }, . } . 394 ( 0.00%) let mut lstart = lspan.lo; 197 ( 0.00%) let mut rstart = rspan.lo; . . for (left, right) in left.stmts.iter().zip(right.stmts) { 560 ( 0.00%) if !self.eq_stmt(left, right) { 157,456 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_stmt (79x) . return false; . } . . // Try to detect any `cfg`ed statements or empty macro expansions. 10 ( 0.00%) let Some(lstmt_span) = walk_span_to_context(left.span, lspan.ctxt) else { . return false; . }; 10 ( 0.00%) let Some(rstmt_span) = walk_span_to_context(right.span, rspan.ctxt) else { . return false; . }; . let lstmt_span = lstmt_span.data(); . let rstmt_span = rstmt_span.data(); . 10 ( 0.00%) if lstmt_span.lo < lstart && rstmt_span.lo < rstart { . // Can happen when macros expand to multiple statements, or rearrange statements. . // Nothing in between the statements to check in this case. . continue; . } 10 ( 0.00%) if lstmt_span.lo < lstart || rstmt_span.lo < rstart { . // Only one of the blocks had a weird macro. . return false; . } 50 ( 0.00%) if !eq_span_tokens(self.inner.cx, lstart..lstmt_span.lo, rstart..rstmt_span.lo, |t| { . !matches!(t, Whitespace | Semi) . }) { . return false; . } . 10 ( 0.00%) lstart = lstmt_span.hi; 10 ( 0.00%) rstart = rstmt_span.hi; . } . 762 ( 0.00%) let (lend, rend) = match (left.expr, right.expr) { . (Some(left), Some(right)) => { 750 ( 0.00%) if !self.eq_expr(left, right) { 182,102 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (122x) 3,505 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (1x) . return false; . } 21 ( 0.00%) let Some(lexpr_span) = walk_span_to_context(left.span, lspan.ctxt) else { 258 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::walk_span_to_context (3x) . return false; . }; 21 ( 0.00%) let Some(rexpr_span) = walk_span_to_context(right.span, rspan.ctxt) else { 258 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::walk_span_to_context (3x) . return false; . }; . (lexpr_span.lo(), rexpr_span.lo()) 3 ( 0.00%) }, 4 ( 0.00%) (None, None) => (lspan.hi, rspan.hi), . (Some(_), None) | (None, Some(_)) => return false, . }; . 20 ( 0.00%) if lend < lstart && rend < rstart { . // Can happen when macros rearrange the input. . // Nothing in between the statements to check in this case. . return true; . } else if lend < lstart || rend < rstart { . // Only one of the blocks had a weird macro . return false; . } 35 ( 0.00%) eq_span_tokens(self.inner.cx, lstart..lend, rstart..rend, |t| { 11,255 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_span_tokens::, core::ops::range::Range, ::eq_block::{closure#3}> (5x) . !matches!(t, Whitespace | Semi) . }) 2,304 ( 0.00%) } . 62,986 ( 0.00%) fn should_ignore(&self, expr: &Expr<'_>) -> bool { 8 ( 0.00%) macro_backtrace(expr.span).last().is_some_and(|macro_call| { 8 ( 0.00%) matches!( 40 ( 0.00%) self.inner.cx.tcx.get_diagnostic_name(macro_call.def_id), 696 ( 0.00%) => ???:::get_diagnostic_name (8x) 48 ( 0.00%) Some(sym::todo_macro | sym::unimplemented_macro) . ) . }) 45,808 ( 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)] 102,080 ( 0.00%) pub fn eq_expr(&mut self, left: &Expr<'_>, right: &Expr<'_>) -> bool { 91,467 ( 0.00%) match self.check_ctxt(left.span.ctxt(), right.span.ctxt()) { 165,265 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::check_ctxt (4,370x) . None => { 46,075 ( 0.00%) if let Some((typeck_lhs, typeck_rhs)) = self.inner.maybe_typeck_results 82,935 ( 0.00%) && typeck_lhs.expr_ty(left) == typeck_rhs.expr_ty(right) 341,432 ( 0.01%) => ???:::expr_ty (8,510x) 125,877 ( 0.00%) && let (Some(l), Some(r)) = ( 35,412 ( 0.00%) ConstEvalCtxt::with_env(self.inner.cx.tcx, self.inner.cx.typing_env(), typeck_lhs) 120,420 ( 0.00%) => ???:::typing_env (4,014x) 8,853 ( 0.00%) .eval_local(left, self.eval_ctxt), 35,412 ( 0.00%) ConstEvalCtxt::with_env(self.inner.cx.tcx, self.inner.cx.typing_env(), typeck_rhs) 120,420 ( 0.00%) => ???:::typing_env (4,014x) 8,853 ( 0.00%) .eval_local(right, self.eval_ctxt), . ) 460 ( 0.00%) && l == r 270 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eq (7x) . { . return true; 19,181 ( 0.00%) } 12,984 ( 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:: (511x) . }, . Some(false) => return false, . Some(true) => {}, . } . 69,751 ( 0.00%) let is_eq = match ( 59,880 ( 0.00%) reduce_exprkind(self.inner.cx, self.eval_ctxt, &left.kind), 17,499 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::reduce_exprkind (4,259x) 49,900 ( 0.00%) reduce_exprkind(self.inner.cx, self.eval_ctxt, &right.kind), 17,702 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::reduce_exprkind (4,259x) . ) { . (ExprKind::AddrOf(lb, l_mut, le), ExprKind::AddrOf(rb, r_mut, re)) => { 330 ( 0.00%) lb == rb && l_mut == r_mut && self.eq_expr(le, re) . }, . (ExprKind::Array(l), ExprKind::Array(r)) => self.eq_exprs(l, r), . (ExprKind::Assign(ll, lr, _), ExprKind::Assign(rl, rr, _)) => { 51 ( 0.00%) self.inner.allow_side_effects && self.eq_expr(ll, rl) && self.eq_expr(lr, rr) . }, . (ExprKind::AssignOp(lo, ll, lr), ExprKind::AssignOp(ro, rl, rr)) => { 12 ( 0.00%) self.inner.allow_side_effects && lo.node == ro.node && self.eq_expr(ll, rl) && self.eq_expr(lr, rr) . }, 32 ( 0.00%) (ExprKind::Block(l, _), ExprKind::Block(r, _)) => self.eq_block(l, r), 19 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_block (1x) . (ExprKind::Binary(l_op, ll, lr), ExprKind::Binary(r_op, rl, rr)) => { 2,935 ( 0.00%) l_op.node == r_op.node && self.eq_expr(ll, rl) && self.eq_expr(lr, rr) 183,932 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (140x) 3,794 ( 0.00%) || self.swap_binop(l_op.node, ll, lr).is_some_and(|(l_op, ll, lr)| { 9,579 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::swap_binop (155x) 1,237 ( 0.00%) l_op == r_op.node && self.eq_expr(ll, rl) && self.eq_expr(lr, rr) 103,623 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (105x) 1,090 ( 0.00%) }) . }, . (ExprKind::Break(li, le), ExprKind::Break(ri, re)) => { 9 ( 0.00%) both(li.label.as_ref(), ri.label.as_ref(), |l, r| l.ident.name == r.ident.name) . && both(le.as_ref(), re.as_ref(), |l, r| self.eq_expr(l, r)) . }, . (ExprKind::Call(l_fun, l_args), ExprKind::Call(r_fun, r_args)) => { 11,369 ( 0.00%) self.inner.allow_side_effects && self.eq_expr(l_fun, r_fun) && self.eq_exprs(l_args, r_args) 213,945 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (252x) . }, . (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)) => { 438 ( 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)) => { 52 ( 0.00%) self.eq_expr(lc, rc) && self.eq_expr(lt, rt) 26,521 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (8x) . && both(le.as_ref(), re.as_ref(), |l, r| self.eq_expr(l, r)) . }, . (ExprKind::Let(l), ExprKind::Let(r)) => { 351 ( 0.00%) self.eq_pat(l.pat, r.pat) 27,831 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_pat (39x) 156 ( 0.00%) && both(l.ty.as_ref(), r.ty.as_ref(), |l, r| self.eq_ty(l, r)) 78 ( 0.00%) && self.eq_expr(l.init, r.init) . }, . (ExprKind::Lit(l), ExprKind::Lit(r)) => { 115 ( 0.00%) if self.check_ctxt(l.span.ctxt(), r.span.ctxt()) == Some(false) { 203 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::check_ctxt (7x) . return false; . } 46 ( 0.00%) l.node == r.node 103 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/ast.rs:::eq (7x) . }, . (ExprKind::Loop(lb, ll, lls, _), ExprKind::Loop(rb, rl, rls, _)) => { . lls == rls && self.eq_block(lb, rb) . && both(ll.as_ref(), rl.as_ref(), |l, r| l.ident.name == r.ident.name) . }, . (ExprKind::Match(le, la, ls), ExprKind::Match(re, ra, rs)) => { . (ls == rs || (matches!((ls, rs), (TryDesugar(_), TryDesugar(_))))) 1,638 ( 0.00%) && self.eq_expr(le, re) 1,383,610 ( 0.04%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (224x) 678 ( 0.00%) && over(la, ra, |l, r| { 473,004 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::over::::eq_expr::{closure#7}> (104x) 1,808 ( 0.00%) self.eq_pat(l.pat, r.pat) 117,200 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_pat (226x) 225 ( 0.00%) && both(l.guard.as_ref(), r.guard.as_ref(), |l, r| self.eq_expr(l, r)) 900 ( 0.00%) && self.eq_expr(l.body, r.body) 387,622 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (225x) . }) . }, . ( . ExprKind::MethodCall(l_path, l_receiver, l_args, _), . ExprKind::MethodCall(r_path, r_receiver, r_args, _), . ) => { 2,940 ( 0.00%) self.inner.allow_side_effects 5,817 ( 0.00%) && self.eq_path_segment(l_path, r_path) 13,392 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path_segment (279x) 4,728 ( 0.00%) && self.eq_expr(l_receiver, r_receiver) 537,911 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (241x) 2,932 ( 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) . }, 21,618 ( 0.00%) (ExprKind::Path(l), ExprKind::Path(r)) => self.eq_qpath(l, r), 23,703 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_qpath (384x) . (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)) => { 1,064 ( 0.00%) self.eq_qpath(l_path, r_path) 23,756 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_qpath (152x) 1,216 ( 0.00%) && match (lo, ro) { . (StructTailExpr::Base(l),StructTailExpr::Base(r)) => self.eq_expr(l, r), . (StructTailExpr::None, StructTailExpr::None) | . (StructTailExpr::DefaultFields(_), StructTailExpr::DefaultFields(_)) => true, . _ => false, . } 912 ( 0.00%) && over(lf, rf, |l, r| self.eq_expr_field(l, r)) 226,069 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::over::::eq_expr::{closure#10}> (152x) . }, . (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), 99 ( 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, . }; 54,731 ( 0.00%) (is_eq && (!self.should_ignore(left) || !self.should_ignore(right))) 27,445 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::should_ignore (847x) 8,508 ( 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)) . }) 81,664 ( 0.00%) } . . fn eq_exprs(&mut self, left: &[Expr<'_>], right: &[Expr<'_>]) -> bool { 13,883 ( 0.00%) over(left, right, |l, r| self.eq_expr(l, r)) 2,418,881 ( 0.07%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (1,100x) . } . . fn eq_expr_field(&mut self, left: &ExprField<'_>, right: &ExprField<'_>) -> bool { 1,423 ( 0.00%) left.ident.name == right.ident.name && self.eq_expr(left.expr, right.expr) 219,557 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr'2 (163x) . } . . fn eq_generic_arg(&mut self, left: &GenericArg<'_>, right: &GenericArg<'_>) -> bool { 1,120 ( 0.00%) match (left, right) { . (GenericArg::Const(l), GenericArg::Const(r)) => self.eq_const_arg(l.as_unambig_ct(), r.as_unambig_ct()), 4 ( 0.00%) (GenericArg::Lifetime(l_lt), GenericArg::Lifetime(r_lt)) => Self::eq_lifetime(l_lt, r_lt), 272 ( 0.00%) (GenericArg::Type(l_ty), GenericArg::Type(r_ty)) => self.eq_ty(l_ty.as_unambig_ty(), r_ty.as_unambig_ty()), 11,026 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_ty (66x) . (GenericArg::Infer(l_inf), GenericArg::Infer(r_inf)) => self.eq_ty(&l_inf.to_ty(), &r_inf.to_ty()), . _ => false, . } . } . . fn eq_const_arg(&mut self, left: &ConstArg<'_>, right: &ConstArg<'_>) -> bool { . if self.check_ctxt(left.span.ctxt(), right.span.ctxt()) == Some(false) { . return false; -- line 704 ---------------------------------------- -- line 760 ---------------------------------------- . } . . fn eq_lifetime(left: &Lifetime, right: &Lifetime) -> bool { . left.kind == right.kind . } . . fn eq_pat_field(&mut self, left: &PatField<'_>, right: &PatField<'_>) -> bool { . let (PatField { ident: li, pat: lp, .. }, PatField { ident: ri, pat: rp, .. }) = (&left, &right); 1,264 ( 0.00%) li.name == ri.name && self.eq_pat(lp, rp) 49,193 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_pat'2 (158x) . } . . fn eq_pat_expr(&mut self, left: &PatExpr<'_>, right: &PatExpr<'_>) -> bool { 145 ( 0.00%) match (&left.kind, &right.kind) { . ( . PatExprKind::Lit { . lit: left, . negated: left_neg, . }, . PatExprKind::Lit { . lit: right, . negated: right_neg, . }, 26 ( 0.00%) ) => left_neg == right_neg && left.node == right.node, 42 ( 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 (2x) 297 ( 0.00%) (PatExprKind::Path(left), PatExprKind::Path(right)) => self.eq_qpath(left, right), 3,996 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_qpath (27x) . (PatExprKind::Lit { .. } | PatExprKind::Path(..), _) => false, . } . } . . /// Checks whether two patterns are the same. 6,513 ( 0.00%) fn eq_pat(&mut self, left: &Pat<'_>, right: &Pat<'_>) -> bool { 6,707 ( 0.00%) match (&left.kind, &right.kind) { . (PatKind::Box(l), PatKind::Box(r)) => self.eq_pat(l, r), . (PatKind::Struct(lp, la, ..), PatKind::Struct(rp, ra, ..)) => { 790 ( 0.00%) self.eq_qpath(lp, rp) && over(la, ra, |l, r| self.eq_pat_field(l, r)) . }, . (PatKind::TupleStruct(lp, la, ls), PatKind::TupleStruct(rp, ra, rs)) => { 532 ( 0.00%) self.eq_qpath(lp, rp) && over(la, ra, |l, r| self.eq_pat(l, r)) && ls == rs . }, . (PatKind::Binding(lb, li, _, lp), PatKind::Binding(rb, ri, _, rp)) => { 236 ( 0.00%) let eq = lb == rb && both(lp.as_ref(), rp.as_ref(), |l, r| self.eq_pat(l, r)); 708 ( 0.00%) if eq { 944 ( 0.00%) self.locals.insert(*li, *ri); . } . eq . }, 58 ( 0.00%) (PatKind::Expr(l), PatKind::Expr(r)) => self.eq_pat_expr(l, r), 228 ( 0.00%) (PatKind::Tuple(l, ls), PatKind::Tuple(r, rs)) => ls == rs && over(l, r, |l, r| self.eq_pat(l, r)), 31,721 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_pat'2 (76x) . (PatKind::Range(ls, le, li), PatKind::Range(rs, re, ri)) => { . both(ls.as_ref(), rs.as_ref(), |a, b| self.eq_pat_expr(a, b)) . && both(le.as_ref(), re.as_ref(), |a, b| self.eq_pat_expr(a, b)) . && (li == ri) . }, 6 ( 0.00%) (PatKind::Ref(le, lp, lm), PatKind::Ref(re, rp, rm)) => lp == rp && lm == rm && self.eq_pat(le, re), . (PatKind::Slice(ls, li, le), PatKind::Slice(rs, ri, re)) => { . over(ls, rs, |l, r| self.eq_pat(l, r)) . && over(le, re, |l, r| self.eq_pat(l, r)) . && both(li.as_ref(), ri.as_ref(), |l, r| self.eq_pat(l, r)) . }, . (PatKind::Wild, PatKind::Wild) => true, . _ => false, . } 3,776 ( 0.00%) } . 11,346 ( 0.00%) fn eq_qpath(&mut self, left: &QPath<'_>, right: &QPath<'_>) -> bool { 20,972 ( 0.00%) match (left, right) { . (QPath::Resolved(lty, lpath), QPath::Resolved(rty, rpath)) => { 28,799 ( 0.00%) both(lty.as_ref(), rty.as_ref(), |l, r| self.eq_ty(l, r)) && self.eq_path(lpath, rpath) 29,952 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path (234x) . }, . (QPath::TypeRelative(lty, lseg), QPath::TypeRelative(rty, rseg)) => { 2,414 ( 0.00%) self.eq_ty(lty, rty) && self.eq_path_segment(lseg, rseg) 23,734 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_ty (142x) 6,816 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path_segment (142x) . }, . _ => false, . } 115 ( 0.00%) } . 32,488 ( 0.00%) pub fn eq_path(&mut self, left: &Path<'_>, right: &Path<'_>) -> bool { 43,334 ( 0.00%) match (left.res, right.res) { 8,782 ( 0.00%) (Res::Local(l), Res::Local(r)) => l == r || self.locals.get(&l) == Some(&r), 4,200 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::get:: (350x) . (Res::Local(_), _) | (_, Res::Local(_)) => false, 400 ( 0.00%) (Res::Def(l_kind, l), Res::Def(r_kind, r)) 24 ( 0.00%) if l_kind == r_kind . && let DefKind::Const { .. } . | DefKind::Static { .. } . | DefKind::Fn . | DefKind::TyAlias . | DefKind::Use . | DefKind::Mod = l_kind => . { 1,993 ( 0.00%) (l == r || self.local_items.get(&l) == Some(&r)) && self.eq_path_segments(left.segments, right.segments) 31,082 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path_segments (197x) 12 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::get:: (1x) . }, 4,564 ( 0.00%) _ => self.eq_path_segments(left.segments, right.segments), . } 32,488 ( 0.00%) } . . fn eq_path_parameters(&mut self, left: &GenericArgs<'_>, right: &GenericArgs<'_>) -> bool { 2,476 ( 0.00%) if left.parenthesized == right.parenthesized { 2,476 ( 0.00%) over(left.args, right.args, |l, r| self.eq_generic_arg(l, r)) // FIXME(flip1995): may not work 2,476 ( 0.00%) && over(left.constraints, right.constraints, |l, r| self.eq_assoc_eq_constraint(l, r)) . } else { . false . } . } . 1,791 ( 0.00%) pub fn eq_path_segments<'tcx>( . &mut self, . mut left: &'tcx [PathSegment<'tcx>], . mut right: &'tcx [PathSegment<'tcx>], . ) -> bool { 4,020 ( 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; . } . 7,515 ( 0.00%) over(left, right, |l, r| self.eq_path_segment(l, r)) 54,714 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path_segment (1,138x) 1,152 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_path_segment'2 (24x) 1,194 ( 0.00%) } . 17,332 ( 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; . } . 12,380 ( 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 . } 19,808 ( 0.00%) } . 1,680 ( 0.00%) pub fn eq_ty(&mut self, left: &Ty<'_>, right: &Ty<'_>) -> bool { 2,100 ( 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. 84,384 ( 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); . 21,096 ( 0.00%) if left == self.eval_ctxt && right == self.eval_ctxt { . None 998 ( 0.00%) } else if left == prev_left && right == prev_right { . // Same as the previous context, no need to recheck anything . Some(true) . } else if left == prev_left 5,540 ( 0.00%) || right == prev_right . || left == self.eval_ctxt . || right == self.eval_ctxt . || left.is_root() . || right.is_root() . { . // Either only one context changed, or at least one context is a parent of the . // evaluation context. . // Unfortunately we can't get a span of a metavariable so we have to treat the . // second case as unequal. . Some(false) . } else { . // Walk each context in lockstep up to the evaluation context checking that each . // expansion has the same kind. 604 ( 0.00%) let mut left_data = left.outer_expn_data(); 1,812 ( 0.00%) let mut right_data = right.outer_expn_data(); . loop { . use TokenKind::{BlockComment, LineComment, Whitespace}; 1,208 ( 0.00%) if left_data.macro_def_id != right_data.macro_def_id || left_data.kind != right_data.kind { . return Some(false); . } 604 ( 0.00%) let left = left_data.call_site.ctxt(); 604 ( 0.00%) let right = right_data.call_site.ctxt(); 1,812 ( 0.00%) if left == self.eval_ctxt && right == self.eval_ctxt { . // Finally if the outermost expansion is a macro call, check if the . // tokens are the same. 1,872 ( 0.00%) if let ExpnKind::Macro(MacroKind::Bang, _) = left_data.kind { 60 ( 0.00%) return Some(eq_span_tokens( 123,227 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_span_tokens::::check_ctxt::{closure#0}> (30x) 60 ( 0.00%) self.inner.cx, 30 ( 0.00%) left_data.call_site, 30 ( 0.00%) right_data.call_site, 495 ( 0.00%) |t| !matches!(t, Whitespace | LineComment { .. } | BlockComment { .. }), . )); . } . return Some(true); . } . if left == prev_left && right == prev_right { . return Some(true); . } . if left == prev_left -- line 973 ---------------------------------------- -- 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(); . } . } 94,932 ( 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>)> { 1,200 ( 0.00%) match binop { . // `==` and `!=`, are commutative 198 ( 0.00%) BinOpKind::Eq | BinOpKind::Ne => Some((binop, rhs, lhs)), . // Comparisons can be reversed 153 ( 0.00%) BinOpKind::Lt => Some((BinOpKind::Gt, rhs, lhs)), 24 ( 0.00%) BinOpKind::Le => Some((BinOpKind::Ge, rhs, lhs)), 6 ( 0.00%) BinOpKind::Ge => Some((BinOpKind::Le, rhs, lhs)), 87 ( 0.00%) BinOpKind::Gt => Some((BinOpKind::Lt, rhs, lhs)), . // Non-commutative operators . BinOpKind::Shl | BinOpKind::Shr | BinOpKind::Rem | BinOpKind::Sub | BinOpKind::Div => None, . // We know that those operators are commutative for primitive types, . // and we don't assume anything for other types . BinOpKind::Mul . | BinOpKind::Add . | BinOpKind::And . | BinOpKind::Or . | BinOpKind::BitAnd . | BinOpKind::BitXor 77 ( 0.00%) | BinOpKind::BitOr => self.inner.maybe_typeck_results.and_then(|(typeck_lhs, _)| { . typeck_lhs 385 ( 0.00%) .expr_ty_adjusted(lhs) 6,117 ( 0.00%) => ???:::expr_ty_adjusted (77x) . .peel_refs() . .is_primitive() . .then_some((binop, rhs, lhs)) . }), . } 240 ( 0.00%) } . } . . /// Some simple reductions like `{ return }` => `return` 19,960 ( 0.00%) fn reduce_exprkind<'hir>( . cx: &LateContext<'_>, . eval_ctxt: SyntaxContext, . kind: &'hir ExprKind<'hir>, . ) -> &'hir ExprKind<'hir> { 39,920 ( 0.00%) if let ExprKind::Block(block, _) = kind { 343 ( 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. 236 ( 0.00%) ([], None) if block.span.is_empty() => &ExprKind::Tup(&[]), . // `{}` => `()` . ([], None) . if block.span.ctxt() != eval_ctxt . || block.span.check_text(cx, |src| { . tokenize(src, FrontmatterAllowed::No) . .map(|t| t.kind) . .filter(|t| { . !matches!( -- line 1043 ---------------------------------------- -- line 1052 ---------------------------------------- . { . &ExprKind::Tup(&[]) . }, . ([], Some(expr)) => match expr.kind { . // `{ return .. }` => `return ..` . ExprKind::Ret(..) => &expr.kind, . _ => kind, . }, 44 ( 0.00%) ([stmt], None) => match stmt.kind { 22 ( 0.00%) StmtKind::Expr(expr) | StmtKind::Semi(expr) => match expr.kind { . // `{ return ..; }` => `return ..` . ExprKind::Ret(..) => &expr.kind, . _ => kind, . }, . _ => kind, . }, . _ => kind, . } . } else { . kind . } 19,960 ( 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 { 16,954 ( 0.00%) left.len() == right.len() && left.iter().zip(right).all(|(x, y)| eq_fn(x, y)) 1,819 ( 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. 8,196 ( 0.00%) pub fn eq_expr_value(cx: &LateContext<'_>, ctxt: SyntaxContext, left: &Expr<'_>, right: &Expr<'_>) -> bool { 2,049 ( 0.00%) SpanlessEq::new(cx).deny_side_effects().eq_expr(ctxt, left, right) 12,294 ( 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 { 2,285 ( 0.00%) Self { . cx, 488 ( 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() . } . 990 ( 0.00%) pub fn hash_block(&mut self, b: &Block<'_>) { 99 ( 0.00%) for s in b.stmts { . self.hash_stmt(s); . } . 297 ( 0.00%) if let Some(e) = b.expr { 118 ( 0.00%) self.hash_expr(e); 121,527 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (39x) . } . . mem::discriminant(&b.rules).hash(&mut self.s); 792 ( 0.00%) } . . #[expect(clippy::too_many_lines)] 29,448 ( 0.00%) pub fn hash_expr(&mut self, e: &Expr<'_>) { 6,544 ( 0.00%) let simple_const = self.maybe_typeck_results.and_then(|typeck_results| { 9,816 ( 0.00%) ConstEvalCtxt::with_env(self.cx.tcx, self.cx.typing_env(), typeck_results).eval_local(e, e.span.ctxt()) 14,640 ( 0.00%) => ???:::typing_env (488x) . }); . . // 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 3,272 ( 0.00%) simple_const.hash(&mut self.s); . if simple_const.is_some() { . return; . } . . mem::discriminant(&e.kind).hash(&mut self.s); . 9,354 ( 0.00%) match &e.kind { . ExprKind::AddrOf(kind, m, e) => { . mem::discriminant(kind).hash(&mut self.s); . m.hash(&mut self.s); 96 ( 0.00%) self.hash_expr(e); . }, . ExprKind::Continue(i) => { 146 ( 0.00%) if let Some(i) = i.label { . self.hash_name(i.ident.name); . } . }, . ExprKind::Array(v) => { 14 ( 0.00%) self.hash_exprs(v); . }, . ExprKind::Assign(l, r, _) => { 184 ( 0.00%) self.hash_expr(l); 12,938 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (26x) . self.hash_expr(r); . }, . ExprKind::AssignOp(o, l, r) => { . mem::discriminant(&o.node).hash(&mut self.s); 18 ( 0.00%) self.hash_expr(l); 2,152 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (6x) . self.hash_expr(r); . }, . ExprKind::Become(f) => { . self.hash_expr(f); . }, . ExprKind::Block(b, _) => { 384 ( 0.00%) self.hash_block(b); 304,944 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_block (65x) 115,486 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_block'2 (31x) . }, . ExprKind::Binary(op, l, r) => { . mem::discriminant(&op.node).hash(&mut self.s); 441 ( 0.00%) self.hash_expr(l); 40,526 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (58x) . self.hash_expr(r); . }, . ExprKind::Break(i, j) => { 36 ( 0.00%) if let Some(i) = i.label { . self.hash_name(i.ident.name); . } 18 ( 0.00%) if let Some(j) = j { . self.hash_expr(j); . } . }, . ExprKind::Call(fun, args) => { 927 ( 0.00%) self.hash_expr(fun); 20,837 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (68x) 309 ( 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 { 12 ( 0.00%) capture_clause, body, .. . }) => { . mem::discriminant(capture_clause).hash(&mut self.s); . // closures inherit TypeckResults 84 ( 0.00%) self.hash_expr(self.cx.tcx.hir_body(*body).value); 1,149 ( 0.00%) => ???:::hir_body (12x) . }, . ExprKind::ConstBlock(l_id) => { . self.hash_body(l_id.body); . }, . ExprKind::DropTemps(e) | ExprKind::Yield(e, _) => { 124 ( 0.00%) self.hash_expr(e); . }, . ExprKind::Field(e, f) => { 462 ( 0.00%) self.hash_expr(e); 5,064 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (11x) 154 ( 0.00%) self.hash_name(f.name); . }, . ExprKind::Index(a, i, _) => { 52 ( 0.00%) self.hash_expr(a); 4,149 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (13x) . self.hash_expr(i); . }, . ExprKind::InlineAsm(asm) => { . for piece in asm.template { . match piece { . InlineAsmTemplatePiece::String(s) => s.hash(&mut self.s), . InlineAsmTemplatePiece::Placeholder { . operand_idx, -- line 1266 ---------------------------------------- -- line 1310 ---------------------------------------- . InlineAsmOperand::Const { anon_const } => { . self.hash_body(anon_const.body); . }, . InlineAsmOperand::SymStatic { path, def_id: _ } => self.hash_qpath(path), . InlineAsmOperand::Label { block } => self.hash_block(block), . } . } . }, 6 ( 0.00%) ExprKind::Let(LetExpr { pat, init, ty, .. }) => { 18 ( 0.00%) self.hash_expr(init); 1,174 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (2x) 18 ( 0.00%) if let Some(ty) = ty { . self.hash_ty(ty); . } 24 ( 0.00%) self.hash_pat(pat); 312 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_pat (2x) . }, . ExprKind::Lit(l) => { . l.node.hash(&mut self.s); . }, . ExprKind::Loop(b, i, ..) => { 9 ( 0.00%) self.hash_block(b); 2,602 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_block (1x) 12,005 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_block'2 (2x) 169 ( 0.00%) if let Some(i) = i { . self.hash_name(i.ident.name); . } . }, . ExprKind::If(cond, then, else_opt) => { 120 ( 0.00%) self.hash_expr(cond); 16,925 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (26x) 120 ( 0.00%) self.hash_expr(then); 149,989 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (26x) . if let Some(e) = else_opt { . self.hash_expr(e); . } . }, . ExprKind::Match(scrutinee, arms, _) => { 189 ( 0.00%) self.hash_expr(scrutinee); 106,759 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (29x) . 63 ( 0.00%) for arm in *arms { 369 ( 0.00%) self.hash_pat(arm.pat); 9,508 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_pat (58x) 369 ( 0.00%) if let Some(e) = arm.guard { . self.hash_expr(e); . } 369 ( 0.00%) self.hash_expr(arm.body); 44,787 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (58x) . } . }, . ExprKind::MethodCall(path, receiver, args, _fn_span) => { 874 ( 0.00%) self.hash_name(path.ident.name); 1,311 ( 0.00%) self.hash_expr(receiver); 63,513 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (192x) 437 ( 0.00%) self.hash_exprs(args); . }, . ExprKind::OffsetOf(container, fields) => { . self.hash_ty(container); . for field in *fields { . self.hash_name(field.name); . } . }, . ExprKind::Path(qpath) => { -- line 1363 ---------------------------------------- -- line 1368 ---------------------------------------- . self.hash_const_arg(len); . }, . ExprKind::Ret(e) => { . if let Some(e) = e { . self.hash_expr(e); . } . }, . ExprKind::Struct(path, fields, expr) => { 21 ( 0.00%) self.hash_qpath(path); . 21 ( 0.00%) for f in *fields { 32 ( 0.00%) self.hash_name(f.ident.name); 96 ( 0.00%) self.hash_expr(f.expr); 21,933 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (32x) . } . 42 ( 0.00%) if let StructTailExpr::Base(e) = expr { 2 ( 0.00%) self.hash_expr(e); . } . }, . ExprKind::Tup(tup) => { 21 ( 0.00%) self.hash_exprs(tup); . }, . ExprKind::Use(expr, _) => { . self.hash_expr(expr); . }, . ExprKind::Unary(l_op, le) => { . mem::discriminant(l_op).hash(&mut self.s); 25 ( 0.00%) self.hash_expr(le); . }, . ExprKind::UnsafeBinderCast(kind, expr, ty) => { . mem::discriminant(kind).hash(&mut self.s); . self.hash_expr(expr); . if let Some(ty) = ty { . self.hash_ty(ty); . } . }, . ExprKind::Err(_) => {}, . } 26,176 ( 0.00%) } . . pub fn hash_exprs(&mut self, e: &[Expr<'_>]) { . for e in e { 2,349 ( 0.00%) self.hash_expr(e); 190,708 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (257x) . } . } . . pub fn hash_name(&mut self, n: Symbol) { . n.hash(&mut self.s); . } . . pub fn hash_qpath(&mut self, p: &QPath<'_>) { 3,481 ( 0.00%) match p { . QPath::Resolved(_, path) => { 4,665 ( 0.00%) self.hash_path(path); 6,048 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_path (126x) . }, . QPath::TypeRelative(_, path) => { 114 ( 0.00%) self.hash_name(path.ident.name); . }, . } . } . . pub fn hash_pat_expr(&mut self, lit: &PatExpr<'_>) { . mem::discriminant(&lit.kind).hash(&mut self.s); 11 ( 0.00%) match &lit.kind { . PatExprKind::Lit { lit, negated } => { . lit.node.hash(&mut self.s); . negated.hash(&mut self.s); . }, . PatExprKind::Path(qpath) => self.hash_qpath(qpath), . } . } . -- line 1439 ---------------------------------------- -- line 1448 ---------------------------------------- . for variant in variants { . self.hash_ty_pat(variant); . } . }, . TyPatKind::NotNull | TyPatKind::Err(_) => {}, . } . } . 4,046 ( 0.00%) pub fn hash_pat(&mut self, pat: &Pat<'_>) { . mem::discriminant(&pat.kind).hash(&mut self.s); 867 ( 0.00%) match &pat.kind { . PatKind::Missing => unreachable!(), . PatKind::Binding(BindingMode(by_ref, mutability), _, _, pat) => { . mem::discriminant(by_ref).hash(&mut self.s); 163 ( 0.00%) if let ByRef::Yes(pi, mu) = by_ref { . mem::discriminant(pi).hash(&mut self.s); . mem::discriminant(mu).hash(&mut self.s); . } . mem::discriminant(mutability).hash(&mut self.s); 652 ( 0.00%) if let Some(pat) = pat { . self.hash_pat(pat); . } . }, . PatKind::Box(pat) | PatKind::Deref(pat) => self.hash_pat(pat), 11 ( 0.00%) PatKind::Expr(expr) => self.hash_pat_expr(expr), . PatKind::Or(pats) => { . for pat in *pats { . self.hash_pat(pat); . } . }, . PatKind::Range(s, e, i) => { . if let Some(s) = s { . self.hash_pat_expr(s); -- line 1480 ---------------------------------------- -- line 1501 ---------------------------------------- . self.hash_pat(pat); . } . for pat in *r { . self.hash_pat(pat); . } . }, . PatKind::Struct(qpath, fields, e) => { . self.hash_qpath(qpath); 86 ( 0.00%) for f in *fields { 83 ( 0.00%) self.hash_name(f.ident.name); 249 ( 0.00%) self.hash_pat(f.pat); 4,067 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_pat'2 (83x) . } . e.hash(&mut self.s); . }, . PatKind::Tuple(pats, e) => { . for pat in *pats { . self.hash_pat(pat); . } . e.hash(&mut self.s); . }, . PatKind::TupleStruct(qpath, pats, e) => { . self.hash_qpath(qpath); 29 ( 0.00%) for pat in *pats { 58 ( 0.00%) self.hash_pat(pat); 1,485 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_pat'2 (29x) . } . e.hash(&mut self.s); 29 ( 0.00%) }, . PatKind::Never | PatKind::Wild | PatKind::Err(_) => {}, . } 2,224 ( 0.00%) } . 12,552 ( 0.00%) pub fn hash_path(&mut self, path: &Path<'_>) { 3,138 ( 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), . _ => { 826 ( 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 { 413 ( 0.00%) for seg in path.segments { 456 ( 0.00%) self.hash_name(seg.ident.name); 1,824 ( 0.00%) self.hash_generic_args(seg.args().args); 1,832 ( 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 (452x) . } . } . }, . } 12,552 ( 0.00%) } . . pub fn hash_modifiers(&mut self, modifiers: TraitBoundModifiers) { . let TraitBoundModifiers { constness, polarity } = modifiers; . mem::discriminant(&polarity).hash(&mut self.s); . mem::discriminant(&constness).hash(&mut self.s); . } . . pub fn hash_stmt(&mut self, b: &Stmt<'_>) { . mem::discriminant(&b.kind).hash(&mut self.s); . 633 ( 0.00%) match &b.kind { . StmtKind::Let(local) => { 192 ( 0.00%) self.hash_pat(local.pat); 2,352 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_pat (48x) 144 ( 0.00%) if let Some(init) = local.init { 96 ( 0.00%) self.hash_expr(init); 93,922 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr'2 (48x) . } 144 ( 0.00%) if let Some(els) = local.els { . self.hash_block(els); . } . }, . StmtKind::Item(..) => {}, . StmtKind::Expr(expr) | StmtKind::Semi(expr) => { 393 ( 0.00%) self.hash_expr(expr); 203,775 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr (72x) . }, . } . } . . pub fn hash_lifetime(&mut self, lifetime: &Lifetime) { . lifetime.ident.name.hash(&mut self.s); . mem::discriminant(&lifetime.kind).hash(&mut self.s); . if let LifetimeKind::Param(param_id) = lifetime.kind { . param_id.hash(&mut self.s); . } . } . . pub fn hash_ty(&mut self, ty: &Ty<'_>) { . mem::discriminant(&ty.kind).hash(&mut self.s); 8 ( 0.00%) self.hash_tykind(&ty.kind); 392 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_tykind (2x) . } . 44 ( 0.00%) pub fn hash_tykind(&mut self, ty: &TyKind<'_>) { 20 ( 0.00%) match ty { . TyKind::Slice(ty) => { . self.hash_ty(ty); . }, . TyKind::Array(ty, len) => { . self.hash_ty(ty); . self.hash_const_arg(len); . }, . TyKind::Pat(ty, pat) => { -- line 1605 ---------------------------------------- -- line 1700 ---------------------------------------- . lit.hash(&mut self.s); . negated.hash(&mut self.s); . }, . } . } . . fn hash_generic_args(&mut self, arg_list: &[GenericArg<'_>]) { . for arg in arg_list { 32 ( 0.00%) match arg { . GenericArg::Lifetime(l) => self.hash_lifetime(l), 4 ( 0.00%) GenericArg::Type(ty) => self.hash_ty(ty.as_unambig_ty()), . GenericArg::Const(ca) => self.hash_const_arg(ca.as_unambig_ct()), 4 ( 0.00%) GenericArg::Infer(inf) => self.hash_ty(&inf.to_ty()), . } . } 456 ( 0.00%) } . } . 144 ( 0.00%) pub fn hash_stmt(cx: &LateContext<'_>, s: &Stmt<'_>) -> u64 { . let mut h = SpanlessHash::new(cx); . h.hash_stmt(s); 72 ( 0.00%) h.finish() 216 ( 0.00%) } . . pub fn is_bool(ty: &Ty<'_>) -> bool { . if let TyKind::Path(QPath::Resolved(_, path)) = ty.kind { . matches!(path.res, Res::PrimTy(PrimTy::Bool)) . } else { . false . } . } . 405 ( 0.00%) pub fn hash_expr(cx: &LateContext<'_>, e: &Expr<'_>) -> u64 { . let mut h = SpanlessHash::new(cx); 405 ( 0.00%) h.hash_expr(e); 713,198 ( 0.02%) => site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr (405x) 405 ( 0.00%) h.finish() 810 ( 0.00%) } . 330 ( 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 { 270 ( 0.00%) if let Some(lsrc) = left.get_source_range(cx) 40 ( 0.00%) && let Some(lsrc) = lsrc.as_str() 280 ( 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 (10x) 270 ( 0.00%) && let Some(rsrc) = right.get_source_range(cx) 40 ( 0.00%) && let Some(rsrc) = rsrc.as_str() 280 ( 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 (10x) . { . let pred = |&(token, ..): &(TokenKind, _, _)| pred(token); . let map = |(_, source, _)| source; . . let ltok = tokenize_with_text(lsrc).filter(pred).map(map); . let rtok = tokenize_with_text(rsrc).filter(pred).map(map); . ltok.eq(rtok) . } else { . // Unable to access the source. Conservatively assume the blocks aren't equal. . false . } . } 270 ( 0.00%) f(cx, left.into_range(), right.into_range(), pred) 2,520 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:::into_range (60x) 280 ( 0.00%) } . . /// Returns true if the expression contains ambiguous literals (unsuffixed float or int literals) . /// that could be interpreted as either f32/f64 or i32/i64 depending on context. . pub fn has_ambiguous_literal_in_expr(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { . match expr.kind { . ExprKind::Path(ref qpath) => { . if let Res::Local(hir_id) = cx.qpath_res(qpath, expr.hir_id) . && let Node::LetStmt(local) = cx.tcx.parent_hir_node(hir_id) -- line 1770 ---------------------------------------- 217,453 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs -------------------------------------------------------------------------------- Ir -- line 116 ---------------------------------------- . } . . fn borrow( . &mut self, . place_with_id: &PlaceWithHirId<'tcx>, . diag_expr_id: HirId, . bk: ty::BorrowKind, . ) { 53 ( 0.00%) (**self).borrow(place_with_id, diag_expr_id, bk) . } . . fn copy(&mut self, place_with_id: &PlaceWithHirId<'tcx>, diag_expr_id: HirId) { . (**self).copy(place_with_id, diag_expr_id) . } . . fn mutate(&mut self, assignee_place: &PlaceWithHirId<'tcx>, diag_expr_id: HirId) { 56 ( 0.00%) (**self).mutate(assignee_place, diag_expr_id) . } . . fn bind(&mut self, binding_place: &PlaceWithHirId<'tcx>, diag_expr_id: HirId) { 22 ( 0.00%) (**self).bind(binding_place, diag_expr_id) . } . . fn fake_read( . &mut self, . place_with_id: &PlaceWithHirId<'tcx>, . cause: FakeReadCause, . diag_expr_id: HirId, . ) { -- line 144 ---------------------------------------- -- line 266 ---------------------------------------- . self.0.type_is_use_cloned_modulo_regions(ty) . } . . fn body_owner_def_id(&self) -> LocalDefId { . self.1 . } . . fn tcx(&self) -> TyCtxt<'tcx> { 469 ( 0.00%) self.0.tcx . } . } . . /// A visitor that reports how each expression is being used. . /// . /// See [module-level docs][self] and [`Delegate`] for details. . pub struct ExprUseVisitor<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> { . cx: Cx, -- line 282 ---------------------------------------- -- line 283 ---------------------------------------- . /// We use a `RefCell` here so that delegates can mutate themselves, but we can . /// still have calls to our own helper functions. . delegate: RefCell, . upvars: Option<&'tcx FxIndexMap>, . } . . impl<'a, 'tcx, D: Delegate<'tcx>> ExprUseVisitor<'tcx, (&'a LateContext<'tcx>, LocalDefId), D> { . pub fn for_clippy(cx: &'a LateContext<'tcx>, body_def_id: LocalDefId, delegate: D) -> Self { 210 ( 0.00%) Self::new((cx, body_def_id), delegate) 12,450 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::new (35x) . } . } . . impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx, Cx, D> { . /// Creates the ExprUseVisitor, configuring it with the various options provided: . /// . /// - `delegate` -- who receives the callbacks . /// - `param_env` --- parameter environment for trait lookups (esp. pertaining to `Copy`) . /// - `typeck_results` --- typeck results for the code being analyzed 682 ( 0.00%) pub(crate) fn new(cx: Cx, delegate: D) -> Self { 310 ( 0.00%) ExprUseVisitor { . delegate: RefCell::new(delegate), . upvars: cx.tcx().upvars_mentioned(cx.body_owner_def_id()), . cx, . } 558 ( 0.00%) } . 27 ( 0.00%) pub fn consume_body(&self, body: &hir::Body<'_>) -> Result<(), Cx::Error> { 3 ( 0.00%) for param in body.params { 18 ( 0.00%) let param_ty = self.pat_ty_adjusted(param.pat)?; 954 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::pat_ty_adjusted (6x) . debug!("consume_body: param_ty = {:?}", param_ty); . 12 ( 0.00%) let param_place = self.cat_rvalue(param.hir_id, param_ty); . . self.fake_read_scrutinee(¶m_place, false)?; 6 ( 0.00%) self.walk_pat(¶m_place, param.pat, false)?; . } . 9 ( 0.00%) self.consume_expr(body.value)?; 103,596 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_expr (3x) . . Ok(()) 24 ( 0.00%) } . . #[instrument(skip(self), level = "debug")] 270 ( 0.00%) fn consume_or_copy(&self, place_with_id: &PlaceWithHirId<'tcx>, diag_expr_id: HirId) { 3,920 ( 0.00%) if self.cx.type_is_copy_modulo_regions(place_with_id.place.ty()) { 127,363 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::type_is_copy_modulo_regions (20x) 240 ( 0.00%) => ???:::ty (20x) . self.delegate.borrow_mut().copy(place_with_id, diag_expr_id); . } else { . self.delegate.borrow_mut().consume(place_with_id, diag_expr_id); . } 216 ( 0.00%) } . . #[instrument(skip(self), level = "debug")] . pub fn consume_clone_or_copy(&self, place_with_id: &PlaceWithHirId<'tcx>, diag_expr_id: HirId) { . // `x.use` will do one of the following . // * if it implements `Copy`, it will be a copy . // * if it implements `UseCloned`, it will be a call to `clone` . // * otherwise, it is a move . // -- line 340 ---------------------------------------- -- line 345 ---------------------------------------- . self.delegate.borrow_mut().use_cloned(place_with_id, diag_expr_id); . } else { . self.delegate.borrow_mut().consume(place_with_id, diag_expr_id); . } . } . . fn consume_exprs(&self, exprs: &[hir::Expr<'_>]) -> Result<(), Cx::Error> { . for expr in exprs { 450 ( 0.00%) self.consume_expr(expr)?; 296,111 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_expr'2 (74x) . } . . Ok(()) . } . . // FIXME: It's suspicious that this is public; clippy should probably use `walk_expr`. . #[instrument(skip(self), level = "debug")] 5,120 ( 0.00%) pub fn consume_expr(&self, expr: &hir::Expr<'_>) -> Result<(), Cx::Error> { 6,920 ( 0.00%) let place_with_id = self.cat_expr(expr)?; 80 ( 0.00%) self.consume_or_copy(&place_with_id, place_with_id.hir_id); 597 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_or_copy (3x) 2,580 ( 0.00%) self.walk_expr(expr)?; 102,440 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::walk_expr (3x) . Ok(()) 4,260 ( 0.00%) } . . #[instrument(skip(self), level = "debug")] . pub fn consume_or_clone_expr(&self, expr: &hir::Expr<'_>) -> Result<(), Cx::Error> { . let place_with_id = self.cat_expr(expr)?; . self.consume_clone_or_copy(&place_with_id, place_with_id.hir_id); . self.walk_expr(expr)?; . Ok(()) . } . 380 ( 0.00%) fn mutate_expr(&self, expr: &hir::Expr<'_>) -> Result<(), Cx::Error> { 220 ( 0.00%) let place_with_id = self.cat_expr(expr)?; . self.delegate.borrow_mut().mutate(&place_with_id, place_with_id.hir_id); 168 ( 0.00%) self.walk_expr(expr)?; 51,695 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::walk_expr'2 (44x) . Ok(()) 132 ( 0.00%) } . . #[instrument(skip(self), level = "debug")] 223 ( 0.00%) fn borrow_expr(&self, expr: &hir::Expr<'_>, bk: ty::BorrowKind) -> Result<(), Cx::Error> { 52 ( 0.00%) let place_with_id = self.cat_expr(expr)?; . self.delegate.borrow_mut().borrow(&place_with_id, place_with_id.hir_id, bk); 75 ( 0.00%) self.walk_expr(expr) 22,379 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::walk_expr'2 (19x) 146 ( 0.00%) } . . #[instrument(skip(self), level = "debug")] 10,503 ( 0.00%) pub fn walk_expr(&self, expr: &hir::Expr<'_>) -> Result<(), Cx::Error> { . self.walk_adjustment(expr)?; . 5,855 ( 0.00%) match expr.kind { . hir::ExprKind::Path(_) => {} . . hir::ExprKind::Type(subexpr, _) => { . self.walk_expr(subexpr)?; . } . . hir::ExprKind::UnsafeBinderCast(_, subexpr, _) => { . self.walk_expr(subexpr)?; . } . . hir::ExprKind::Unary(hir::UnOp::Deref, base) => { . // *base 10 ( 0.00%) self.walk_expr(base)?; . } . . hir::ExprKind::Field(base, _) => { . // base.f . self.walk_expr(base)?; . } . 24 ( 0.00%) hir::ExprKind::Index(lhs, rhs, _) => { . // lhs[rhs] 24 ( 0.00%) self.walk_expr(lhs)?; 1,805 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::walk_expr'2 (1x) . self.consume_expr(rhs)?; . } . 255 ( 0.00%) hir::ExprKind::Call(callee, args) => { . // callee(args) 166 ( 0.00%) self.consume_expr(callee)?; 20,326 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_expr'2 (33x) . self.consume_exprs(args)?; . } . . hir::ExprKind::Use(expr, _) => { . self.consume_or_clone_expr(expr)?; . } . 384 ( 0.00%) hir::ExprKind::MethodCall(.., receiver, args, _) => { . // callee.m(args) 252 ( 0.00%) self.consume_expr(receiver)?; 22,196 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_expr (19x) . self.consume_exprs(args)?; . } . 6 ( 0.00%) hir::ExprKind::Struct(_, fields, ref opt_with) => { . self.walk_struct_expr(fields, opt_with)?; . } . 6 ( 0.00%) hir::ExprKind::Tup(exprs) => { . self.consume_exprs(exprs)?; . } . 66 ( 0.00%) hir::ExprKind::If(cond_expr, then_expr, ref opt_else_expr) => { 66 ( 0.00%) self.consume_expr(cond_expr)?; 5,446 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_expr'2 (4x) 99 ( 0.00%) self.consume_expr(then_expr)?; 103,120 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_expr'2 (4x) 99 ( 0.00%) if let Some(else_expr) = *opt_else_expr { . self.consume_expr(else_expr)?; . } . } . 5 ( 0.00%) hir::ExprKind::Let(hir::LetExpr { pat, init, .. }) => { 30 ( 0.00%) self.walk_local(init, pat, None, || self.borrow_expr(init, BorrowKind::Immutable))?; 12,251 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::borrow_expr (5x) . } . 15 ( 0.00%) hir::ExprKind::Match(discr, arms, _) => { 40 ( 0.00%) let discr_place = self.cat_expr(discr)?; . self.fake_read_scrutinee(&discr_place, true)?; 15 ( 0.00%) self.walk_expr(discr)?; 12,488 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::walk_expr'2 (1x) . . for arm in arms { . self.walk_arm(&discr_place, arm)?; . } . } . 1 ( 0.00%) hir::ExprKind::Array(exprs) => { . self.consume_exprs(exprs)?; . } . 39 ( 0.00%) hir::ExprKind::AddrOf(_, m, base) => { . // &base . // make sure that the thing we are pointing out stays valid . // for the lifetime `scope_r` of the resulting ptr: . let bk = ty::BorrowKind::from_mutbl(m); 77 ( 0.00%) self.borrow_expr(base, bk)?; 517 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::borrow_expr (1x) . } . . hir::ExprKind::InlineAsm(asm) => { . for (op, _op_sp) in asm.operands { . match op { . hir::InlineAsmOperand::In { expr, .. } => { . self.consume_expr(expr)?; . } -- line 484 ---------------------------------------- -- line 504 ---------------------------------------- . } . . hir::ExprKind::Continue(..) . | hir::ExprKind::Lit(..) . | hir::ExprKind::ConstBlock(..) . | hir::ExprKind::OffsetOf(..) . | hir::ExprKind::Err(_) => {} . 3 ( 0.00%) hir::ExprKind::Loop(blk, ..) => { . self.walk_block(blk)?; . } . . hir::ExprKind::Unary(_, lhs) => { . self.consume_expr(lhs)?; . } . 72 ( 0.00%) hir::ExprKind::Binary(_, lhs, rhs) => { 72 ( 0.00%) self.consume_expr(lhs)?; 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_typeck/src/expr_use_visitor.rs:>::consume_expr (3x) . self.consume_expr(rhs)?; . } . 93 ( 0.00%) hir::ExprKind::Block(blk, _) => { . self.walk_block(blk)?; . } . . hir::ExprKind::Break(_, ref opt_expr) | hir::ExprKind::Ret(ref opt_expr) => { 63 ( 0.00%) if let Some(expr) = *opt_expr { 68 ( 0.00%) self.consume_expr(expr)?; . } . } . . hir::ExprKind::Become(call) => { . self.consume_expr(call)?; . } . 84 ( 0.00%) hir::ExprKind::Assign(lhs, rhs, _) => { 84 ( 0.00%) self.mutate_expr(lhs)?; 33,343 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::mutate_expr (12x) . self.consume_expr(rhs)?; . } . . hir::ExprKind::Cast(base, _) => { . self.consume_expr(base)?; . } . . hir::ExprKind::DropTemps(expr) => { . self.consume_expr(expr)?; . } . 28 ( 0.00%) hir::ExprKind::AssignOp(_, lhs, rhs) => { 98 ( 0.00%) if self.cx.typeck_results().is_method_call(expr) { 70 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (14x) 473 ( 0.00%) => ???:::is_method_call (14x) . self.consume_expr(lhs)?; . } else { 42 ( 0.00%) self.mutate_expr(lhs)?; 22,406 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::mutate_expr (14x) . } 275 ( 0.00%) self.consume_expr(rhs)?; . } . . hir::ExprKind::Repeat(base, _) => { . self.consume_expr(base)?; . } . 4 ( 0.00%) hir::ExprKind::Closure(closure) => { 4 ( 0.00%) self.walk_captures(closure)?; . } . . hir::ExprKind::Yield(value, _) => { . self.consume_expr(value)?; . } . } . . Ok(()) 9,336 ( 0.00%) } . . fn walk_stmt(&self, stmt: &hir::Stmt<'_>) -> Result<(), Cx::Error> { 632 ( 0.00%) match stmt.kind { . hir::StmtKind::Let(hir::LetStmt { pat, init: Some(expr), els, .. }) => { 64 ( 0.00%) self.walk_local(expr, pat, *els, || Ok(()))?; 15,637 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::walk_local::<>::walk_stmt::{closure#0}> (2x) 16 ( 0.00%) } . . hir::StmtKind::Let(_) => {} . . hir::StmtKind::Item(_) => { . // We don't visit nested items in this visitor, . // only the fn body we were given. . } . 118 ( 0.00%) hir::StmtKind::Expr(expr) | hir::StmtKind::Semi(expr) => { 233 ( 0.00%) self.consume_expr(expr)?; 1,759,039 ( 0.05%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_expr (16x) . } . } . . Ok(()) . } . . #[instrument(skip(self), level = "debug")] . fn fake_read_scrutinee( -- line 599 ---------------------------------------- -- line 612 ---------------------------------------- . FakeReadCause::ForLet(closure_def_id) . }; . . self.delegate.borrow_mut().fake_read(discr_place, cause, discr_place.hir_id); . . Ok(()) . } . 176 ( 0.00%) fn walk_local( . &self, . expr: &hir::Expr<'_>, . pat: &hir::Pat<'_>, . els: Option<&hir::Block<'_>>, . mut f: F, . ) -> Result<(), Cx::Error> . where . F: FnMut() -> Result<(), Cx::Error>, . { 31 ( 0.00%) self.walk_expr(expr)?; 147,677 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::walk_expr'2 (13x) 168 ( 0.00%) let expr_place = self.cat_expr(expr)?; . f()?; . self.fake_read_scrutinee(&expr_place, els.is_some())?; . self.walk_pat(&expr_place, pat, false)?; 16 ( 0.00%) if let Some(els) = els { . self.walk_block(els)?; . } . Ok(()) 128 ( 0.00%) } . . /// Indicates that the value of `blk` will be consumed, meaning either copied or moved . /// depending on its type. . #[instrument(skip(self), level = "debug")] . fn walk_block(&self, blk: &hir::Block<'_>) -> Result<(), Cx::Error> { 96 ( 0.00%) for stmt in blk.stmts { . self.walk_stmt(stmt)?; . } . 288 ( 0.00%) if let Some(tail_expr) = blk.expr { . self.consume_expr(tail_expr)?; . } . . Ok(()) . } . . fn walk_struct_expr<'hir>( . &self, . fields: &[hir::ExprField<'_>], . opt_with: &hir::StructTailExpr<'hir>, . ) -> Result<(), Cx::Error> { . // Consume the expressions supplying values for each field. . for field in fields { 32 ( 0.00%) self.consume_expr(field.expr)?; 34,466 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_expr'2 (8x) . . // The struct path probably didn't resolve 48 ( 0.00%) if self.cx.typeck_results().opt_field_index(field.hir_id).is_none() { 312 ( 0.00%) => ???:::opt_field_index (8x) 40 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (8x) . self.cx . .tcx() . .dcx() . .span_delayed_bug(field.span, "couldn't resolve index for field"); . } . } . 6 ( 0.00%) let with_expr = match *opt_with { . hir::StructTailExpr::Base(w) => &*w, . hir::StructTailExpr::DefaultFields(_) . | hir::StructTailExpr::None . | hir::StructTailExpr::NoneWithError(_) => { . return Ok(()); . } . }; . -- line 682 ---------------------------------------- -- line 719 ---------------------------------------- . . Ok(()) . } . . /// Invoke the appropriate delegate calls for anything that gets . /// consumed or borrowed as part of the automatic adjustment . /// process. . fn walk_adjustment(&self, expr: &hir::Expr<'_>) -> Result<(), Cx::Error> { 2,334 ( 0.00%) let typeck_results = self.cx.typeck_results(); 240 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (48x) 5,835 ( 0.00%) let adjustments = typeck_results.expr_adjustments(expr); 1,877 ( 0.00%) => ???:::expr_adjustments (48x) 4,668 ( 0.00%) let mut place_with_id = self.cat_expr_unadjusted(expr)?; 4,996 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_expr_unadjusted (48x) . for (adjustment_index, adjustment) in adjustments.iter().enumerate() { . let is_last_adjustment = adjustment_index + 1 == adjustments.len(); . debug!("walk_adjustment expr={:?} adj={:?}", expr, adjustment); 5,154 ( 0.00%) match adjustment.kind { . adjustment::Adjust::NeverToAny | adjustment::Adjust::Pointer(_) => { . // Creating a closure/fn-pointer or unsizing consumes . // the input and stores it into the resulting rvalue. 9 ( 0.00%) self.consume_or_copy(&place_with_id, place_with_id.hir_id); 336 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_or_copy (3x) . } . . adjustment::Adjust::Deref(DerefAdjustKind::Builtin | DerefAdjustKind::Pin) => {} . . // Autoderefs for overloaded Deref calls in fact reference . // their receiver. That is, if we have `(*x)` where `x` . // is of type `Rc`, then this in fact is equivalent to . // `x.deref()`. Since `deref()` is declared with `&self`, . // this is an autoref of `x`. . adjustment::Adjust::Deref(DerefAdjustKind::Overloaded(deref)) => { . let bk = ty::BorrowKind::from_mutbl(deref.mutbl); . self.delegate.borrow_mut().borrow(&place_with_id, place_with_id.hir_id, bk); . } . . adjustment::Adjust::Borrow(ref autoref) => { 193 ( 0.00%) self.walk_autoref(expr, &place_with_id, autoref); . } . . adjustment::Adjust::GenericReborrow(mutability) if is_last_adjustment => { . let bk = ty::BorrowKind::from_mutbl(mutability); . self.delegate.borrow_mut().borrow(&place_with_id, place_with_id.hir_id, bk); . } . . adjustment::Adjust::GenericReborrow(_) => { . span_bug!(expr.span, "generic reborrow adjustment must be terminal"); . } . } 864 ( 0.00%) place_with_id = self.cat_expr_adjusted(expr, place_with_id, adjustment)?; . } . . Ok(()) . } . . /// Walks the autoref `autoref` applied to the autoderef'd . /// `expr`. `base_place` is `expr` represented as a place, . /// after all relevant autoderefs have occurred. -- line 773 ---------------------------------------- -- line 777 ---------------------------------------- . base_place: &PlaceWithHirId<'tcx>, . autoref: &adjustment::AutoBorrow, . ) { . debug!( . "walk_autoref(expr.hir_id={} base_place={:?} autoref={:?})", . expr.hir_id, base_place, autoref . ); . 402 ( 0.00%) match *autoref { . adjustment::AutoBorrow::Ref(m) => { . self.delegate.borrow_mut().borrow( . base_place, . base_place.hir_id, . ty::BorrowKind::from_mutbl(m.into()), . ); . } . -- line 793 ---------------------------------------- -- line 803 ---------------------------------------- . } . } . . fn walk_arm( . &self, . discr_place: &PlaceWithHirId<'tcx>, . arm: &hir::Arm<'_>, . ) -> Result<(), Cx::Error> { 9 ( 0.00%) self.walk_pat(discr_place, arm.pat, arm.guard.is_some())?; . 18 ( 0.00%) if let Some(ref e) = arm.guard { . self.consume_expr(e)?; . } . 27 ( 0.00%) self.consume_expr(arm.body)?; 60,708 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_expr'2 (2x) . Ok(()) . } . . /// The core driver for walking a pattern . /// . /// This should mirror how pattern-matching gets lowered to MIR, as . /// otherwise said lowering will ICE when trying to resolve the upvars. . /// -- line 825 ---------------------------------------- -- line 832 ---------------------------------------- . /// in the semantics of the language, and should be avoided if possible. . #[instrument(skip(self), level = "debug")] . fn walk_pat( . &self, . discr_place: &PlaceWithHirId<'tcx>, . pat: &hir::Pat<'_>, . has_guard: bool, . ) -> Result<(), Cx::Error> { 81 ( 0.00%) let tcx = self.cx.tcx(); 842 ( 0.00%) self.cat_pattern(discr_place.clone(), pat, &mut |place, pat| { 21,082 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_pattern::<>::walk_pat::{closure#0}> (2x) . debug!("walk_pat: pat.kind={:?}", pat.kind); 137 ( 0.00%) let read_discriminant = || { . self.delegate.borrow_mut().borrow(place, discr_place.hir_id, BorrowKind::Immutable); . }; . 336 ( 0.00%) match pat.kind { 97 ( 0.00%) PatKind::Binding(_, canonical_id, ..) => { . debug!("walk_pat: binding place={:?} pat={:?}", place, pat); 46 ( 0.00%) let bm = self . .cx 72 ( 0.00%) .typeck_results() 100 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (20x) 363 ( 0.00%) .extract_binding_mode(tcx.sess, pat.hir_id, pat.span); 900 ( 0.00%) => ???:::extract_binding_mode (20x) . debug!("walk_pat: pat.hir_id={:?} bm={:?}", pat.hir_id, bm); . . // pat_ty: the type of the binding being produced. . let pat_ty = self.node_ty(pat.hir_id)?; . debug!("walk_pat: pat_ty={:?}", pat_ty); . . let def = Res::Local(canonical_id); . if let Ok(ref binding_place) = self.cat_res(pat.hir_id, pat.span, pat_ty, def) { . self.delegate.borrow_mut().bind(binding_place, binding_place.hir_id); . } . . // Subtle: MIR desugaring introduces immutable borrows for each pattern . // binding when lowering pattern guards to ensure that the guard does not . // modify the scrutinee. 99 ( 0.00%) if has_guard { . read_discriminant(); . } . . // It is also a borrow or copy/move of the value being matched. . // In a cases of pattern like `let pat = upvar`, don't use the span . // of the pattern, as this just looks confusing, instead use the span . // of the discriminant. 101 ( 0.00%) match bm.0 { . hir::ByRef::Yes(_, m) => { . let bk = ty::BorrowKind::from_mutbl(m); . self.delegate.borrow_mut().borrow(place, discr_place.hir_id, bk); . } 31 ( 0.00%) hir::ByRef::No => { . debug!("walk_pat binding consuming pat"); 33 ( 0.00%) self.consume_or_copy(place, discr_place.hir_id); 10,137 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_or_copy (11x) . } . } . } . PatKind::Deref(subpattern) => { . // A deref pattern is a bit special: the binding mode of its inner bindings . // determines whether to borrow *at the level of the deref pattern* rather than . // borrowing the bound place (since that inner place is inside the temporary that . // stores the result of calling `deref()`/`deref_mut()` so can't be captured). -- line 891 ---------------------------------------- -- line 936 ---------------------------------------- . // possible values, such as 0..=u8::MAX. This is because . // we don't want to depend on consteval here. . // . // FIXME: What if the type being matched only has one . // possible value? . read_discriminant(); . } . PatKind::Struct(..) | PatKind::TupleStruct(..) => { 14 ( 0.00%) if self.is_multivariant_adt(place.place.ty(), pat.span) { 48 ( 0.00%) => ???:::ty (4x) . read_discriminant(); . } . } . PatKind::Slice(lhs, wild, rhs) => { . // We don't need to test the length if the pattern is `[..]` . if matches!((lhs, wild, rhs), (&[], Some(_), &[])) . // Arrays have a statically known size, so . // there is no need to read their length -- line 952 ---------------------------------------- -- line 968 ---------------------------------------- . // If the PatKind is Or, Box, Ref, Guard, or Tuple, the relevant accesses . // are made later as these patterns contains subpatterns. . // If the PatKind is Missing, Wild or Err, any relevant accesses are made when processing . // the other patterns that are part of the match . } . } . . Ok(()) 352 ( 0.00%) }) . } . . /// Handle the case where the current body contains a closure. . /// . /// When the current body being handled is a closure, then we must make sure that . /// - The parent closure only captures Places from the nested closure that are not local to it. . /// . /// In the following example the closures `c` only captures `p.x` even though `incr` -- line 984 ---------------------------------------- -- line 1000 ---------------------------------------- . fn upvar_is_local_variable( . upvars: Option<&FxIndexMap>, . upvar_id: HirId, . body_owner_is_closure: bool, . ) -> bool { . upvars.map(|upvars| !upvars.contains_key(&upvar_id)).unwrap_or(body_owner_is_closure) . } . 4 ( 0.00%) let tcx = self.cx.tcx(); . let closure_def_id = closure_expr.def_id; . // For purposes of this function, coroutine and closures are equivalent. 2 ( 0.00%) let body_owner_is_closure = matches!( 16 ( 0.00%) tcx.hir_body_owner_kind(self.cx.body_owner_def_id()), 88 ( 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:: (1x) . hir::BodyOwnerKind::Closure . ); . . // If we have a nested closure, we want to include the fake reads present in the nested . // closure. 7 ( 0.00%) if let Some(fake_reads) = self.cx.typeck_results().closure_fake_reads.get(&closure_def_id) { 5 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (1x) . for (fake_read, cause, hir_id) in fake_reads.iter() { . match fake_read.base { . PlaceBase::Upvar(upvar_id) => { . if upvar_is_local_variable( . self.upvars, . upvar_id.var_path.hir_id, . body_owner_is_closure, . ) { -- line 1026 ---------------------------------------- -- line 1054 ---------------------------------------- . &PlaceWithHirId { place: fake_read.clone(), hir_id: *hir_id }, . *cause, . *hir_id, . ); . } . } . . if let Some(min_captures) = 7 ( 0.00%) self.cx.typeck_results().closure_min_captures.get(&closure_def_id) 5 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (1x) . { . for (var_hir_id, min_list) in min_captures.iter() { 2 ( 0.00%) if self . .upvars . .map_or(body_owner_is_closure, |upvars| !upvars.contains_key(var_hir_id)) . { . // The nested closure might be capturing the current (enclosing) closure's local variables. . // We check if the root variable is ever mentioned within the enclosing closure, if not . // then for the current body (if it's a closure) these aren't captures, we will ignore them. . continue; . } . for captured_place in min_list { . let place = &captured_place.place; . let capture_info = captured_place.info; . 1 ( 0.00%) let place_base = if body_owner_is_closure { . // Mark the place to be captured by the enclosing closure . PlaceBase::Upvar(ty::UpvarId::new(*var_hir_id, self.cx.body_owner_def_id())) . } else { . // If the body owner isn't a closure then the variable must . // be a local variable . PlaceBase::Local(*var_hir_id) . }; . let closure_hir_id = tcx.local_def_id_to_hir_id(closure_def_id); -- line 1086 ---------------------------------------- -- line 1088 ---------------------------------------- . capture_info . .path_expr_id . .unwrap_or(capture_info.capture_kind_expr_id.unwrap_or(closure_hir_id)), . place.base_ty, . place_base, . place.projections.clone(), . ); . 7 ( 0.00%) match capture_info.capture_kind { . ty::UpvarCapture::ByValue => { . self.consume_or_copy(&place_with_id, place_with_id.hir_id); . } . ty::UpvarCapture::ByUse => { . self.consume_clone_or_copy(&place_with_id, place_with_id.hir_id); . } . ty::UpvarCapture::ByRef(upvar_borrow) => { . self.delegate.borrow_mut().borrow( -- line 1104 ---------------------------------------- -- line 1126 ---------------------------------------- . /// two operations: a dereference to reach the array data and then an index to . /// jump forward to the relevant item. . impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx, Cx, D> { . fn expect_and_resolve_type( . &self, . id: HirId, . ty: Option>, . ) -> Result, Cx::Error> { 4,326 ( 0.00%) match ty { . Some(ty) => { . let ty = self.cx.resolve_vars_if_possible(ty); . self.cx.error_reported_in_ty(ty)?; . Ok(ty) . } . None => { . // FIXME: We shouldn't be relying on the infcx being tainted. . self.cx.tainted_by_errors()?; . bug!("no type for node {} in ExprUseVisitor", self.cx.tcx().hir_id_to_string(id)); . } . } . } . . fn node_ty(&self, hir_id: HirId) -> Result, Cx::Error> { 328 ( 0.00%) self.expect_and_resolve_type(hir_id, self.cx.typeck_results().node_type_opt(hir_id)) 740 ( 0.00%) => ???:::node_type_opt (20x) 100 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (20x) . } . 14,770 ( 0.00%) fn expr_ty(&self, expr: &hir::Expr<'_>) -> Result, Cx::Error> { 16,880 ( 0.00%) self.expect_and_resolve_type(expr.hir_id, self.cx.typeck_results().expr_ty_opt(expr)) 23,928 ( 0.00%) => ???:::expr_ty_opt (612x) 3,060 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (612x) 12,660 ( 0.00%) } . . fn expr_ty_adjusted(&self, expr: &hir::Expr<'_>) -> Result, Cx::Error> { . self.expect_and_resolve_type( 8 ( 0.00%) expr.hir_id, 12 ( 0.00%) self.cx.typeck_results().expr_ty_adjusted_opt(expr), 90 ( 0.00%) => ???:::expr_ty_adjusted_opt (2x) 10 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (2x) . ) . } . . /// Returns the type of value that this pattern matches against. . /// Some non-obvious cases: . /// . /// - a `ref x` binding matches against a value of type `T` and gives . /// `x` the type `&T`; we return `T`. . /// - a pattern with implicit derefs (thanks to default binding . /// modes #42640) may look like `Some(x)` but in fact have . /// implicit deref patterns attached (e.g., it is really . /// `&Some(x)`). In that case, we return the "outermost" type . /// (e.g., `&Option`). 162 ( 0.00%) fn pat_ty_adjusted(&self, pat: &hir::Pat<'_>) -> Result, Cx::Error> { . // Check for implicit `&` types wrapping the pattern; note . // that these are never attached to binding patterns, so . // actually this is somewhat "disjoint" from the code below . // that aims to account for `ref x`. 90 ( 0.00%) if let Some(vec) = self.cx.typeck_results().pat_adjustments().get(pat.hir_id) { 55 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (11x) . if let Some(first_adjust) = vec.first() { . debug!("pat_ty(pat={:?}) found adjustment `{:?}`", pat, first_adjust); . return Ok(first_adjust.source); . } 36 ( 0.00%) } else if let PatKind::Ref(subpat, _, _) = pat.kind . && self.cx.typeck_results().skipped_ref_pats().contains(pat.hir_id) . { . return self.pat_ty_adjusted(subpat); . } . 54 ( 0.00%) self.pat_ty_unadjusted(pat) 1,242 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::pat_ty_unadjusted (11x) 144 ( 0.00%) } . . /// Like [`Self::pat_ty_adjusted`], but ignores implicit `&` patterns. 162 ( 0.00%) fn pat_ty_unadjusted(&self, pat: &hir::Pat<'_>) -> Result, Cx::Error> { 36 ( 0.00%) let base_ty = self.node_ty(pat.hir_id)?; . trace!(?base_ty); . . // This code detects whether we are looking at a `ref x`, . // and if so, figures out what the type *being borrowed* is. 36 ( 0.00%) match pat.kind { . PatKind::Binding(..) => { 32 ( 0.00%) let bm = *self . .cx 48 ( 0.00%) .typeck_results() 45 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (9x) . .pat_binding_modes() . .get(pat.hir_id) . .expect("missing binding mode"); . 48 ( 0.00%) if let hir::ByRef::Yes(pinnedness, _) = bm.0 { . let base_ty = if pinnedness.is_pinned() { . base_ty.pinned_ty().ok_or_else(|| { . debug!("By-pin-ref binding of non-`Pin` type: {base_ty:?}"); . self.cx.report_bug(pat.span, "by-pin-ref binding of non-`Pin` type") . })? . } else { . base_ty . }; -- line 1216 ---------------------------------------- -- line 1228 ---------------------------------------- . } . } . } else { . Ok(base_ty) . } . } . _ => Ok(base_ty), . } 144 ( 0.00%) } . 168 ( 0.00%) fn cat_expr(&self, expr: &hir::Expr<'_>) -> Result, Cx::Error> { 6,663 ( 0.00%) self.cat_expr_(expr, self.cx.typeck_results().expr_adjustments(expr)) 970 ( 0.00%) => ???:::expr_adjustments (22x) 110 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (22x) 50 ( 0.00%) } . . /// This recursion helper avoids going through *too many* . /// adjustments, since *only* non-overloaded deref recurses. . fn cat_expr_( . &self, . expr: &hir::Expr<'_>, . adjustments: &[adjustment::Adjustment<'tcx>], . ) -> Result, Cx::Error> { . match adjustments.split_last() { 2,571 ( 0.00%) None => self.cat_expr_unadjusted(expr), 1,884 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_expr_unadjusted'2 (12x) . Some((adjustment, previous)) => { 3,709 ( 0.00%) self.cat_expr_adjusted_with(expr, || self.cat_expr_(expr, previous), adjustment) 4,319 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_expr_adjusted_with::<>::cat_expr_::{closure#0}> (10x) . } . } . } . . fn cat_expr_adjusted( . &self, . expr: &hir::Expr<'_>, . previous: PlaceWithHirId<'tcx>, . adjustment: &adjustment::Adjustment<'tcx>, . ) -> Result, Cx::Error> { 864 ( 0.00%) self.cat_expr_adjusted_with(expr, || Ok(previous), adjustment) . } . . fn cat_expr_adjusted_with( . &self, . expr: &hir::Expr<'_>, . previous: F, . adjustment: &adjustment::Adjustment<'tcx>, . ) -> Result, Cx::Error> . where . F: FnOnce() -> Result, Cx::Error>, . { 386 ( 0.00%) let target = self.cx.resolve_vars_if_possible(adjustment.target); 2,022 ( 0.00%) match adjustment.kind { . adjustment::Adjust::Deref(deref_kind) => { . // Equivalent to *expr or something similar. 724 ( 0.00%) let base = if let DerefAdjustKind::Overloaded(deref) = deref_kind { . let ref_ty = Ty::new_ref( 1 ( 0.00%) self.cx.tcx(), 1 ( 0.00%) self.cx.tcx().lifetimes.re_erased, . target, . deref.mutbl, . ); . self.cat_rvalue(expr.hir_id, ref_ty) . } else { 2,493 ( 0.00%) previous()? . }; 2,080 ( 0.00%) self.cat_deref(expr.hir_id, base) 566 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_deref (2x) . } . . adjustment::Adjust::NeverToAny . | adjustment::Adjust::Pointer(_) . | adjustment::Adjust::Borrow(_) . | adjustment::Adjust::GenericReborrow(..) => { . // Result is an rvalue. 3,643 ( 0.00%) Ok(self.cat_rvalue(expr.hir_id, target)) . } . } 386 ( 0.00%) } . 27,404 ( 0.00%) fn cat_expr_unadjusted(&self, expr: &hir::Expr<'_>) -> Result, Cx::Error> { 8,432 ( 0.00%) let expr_ty = self.expr_ty(expr)?; 90,182 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::expr_ty (1,346x) 8,464 ( 0.00%) match expr.kind { 2 ( 0.00%) hir::ExprKind::Unary(hir::UnOp::Deref, e_base) => { 16 ( 0.00%) if self.cx.typeck_results().is_method_call(expr) { 10 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (2x) 102 ( 0.00%) => ???:::is_method_call (2x) . self.cat_overloaded_place(expr, e_base) . } else { 8 ( 0.00%) let base = self.cat_expr(e_base)?; 360 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_expr (2x) 12 ( 0.00%) self.cat_deref(expr.hir_id, base) 581 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_deref (2x) . } . } . 175 ( 0.00%) hir::ExprKind::Field(base, _) => { 525 ( 0.00%) let base = self.cat_expr(base)?; . debug!(?base); . . let field_idx = self . .cx 350 ( 0.00%) .typeck_results() 600 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (120x) . .field_indices() 350 ( 0.00%) .get(expr.hir_id) . .cloned() . .expect("Field index not found"); . 875 ( 0.00%) Ok(self.cat_projection( . expr.hir_id, 1,400 ( 0.00%) base, . expr_ty, . ProjectionKind::Field(field_idx, FIRST_VARIANT), . )) . } . 24 ( 0.00%) hir::ExprKind::Index(base, _, _) => { 168 ( 0.00%) if self.cx.typeck_results().is_method_call(expr) { 110 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (22x) 692 ( 0.00%) => ???:::is_method_call (22x) . // If this is an index implemented by a method call, then it . // will include an implicit deref of the result. . // The call to index() returns a `&T` value, which . // is an rvalue. That is what we will be . // dereferencing. 8 ( 0.00%) self.cat_overloaded_place(expr, base) . } else { 88 ( 0.00%) let base = self.cat_expr(base)?; 7,867 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_expr (22x) 66 ( 0.00%) Ok(self.cat_projection(expr.hir_id, base, expr_ty, ProjectionKind::Index)) . } . } . 876 ( 0.00%) hir::ExprKind::Path(ref qpath) => { 8,760 ( 0.00%) let res = self.cx.typeck_results().qpath_res(qpath, expr.hir_id); 8,627 ( 0.00%) => ???:::qpath_res (485x) 2,425 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (485x) 876 ( 0.00%) self.cat_res(expr.hir_id, expr.span, expr_ty, res) 876 ( 0.00%) } . . // type ascription doesn't affect the place-ness of the subexpression. . hir::ExprKind::Type(e, _) => self.cat_expr(e), . . hir::ExprKind::UnsafeBinderCast(UnsafeBinderCastKind::Unwrap, e, _) => { . let base = self.cat_expr(e)?; . Ok(self.cat_projection( . expr.hir_id, -- line 1360 ---------------------------------------- -- line 1389 ---------------------------------------- . | hir::ExprKind::ConstBlock(..) . | hir::ExprKind::Break(..) . | hir::ExprKind::Continue(..) . | hir::ExprKind::Struct(..) . | hir::ExprKind::Repeat(..) . | hir::ExprKind::InlineAsm(..) . | hir::ExprKind::OffsetOf(..) . | hir::ExprKind::UnsafeBinderCast(UnsafeBinderCastKind::Wrap, ..) 7,217 ( 0.00%) | hir::ExprKind::Err(_) => Ok(self.cat_rvalue(expr.hir_id, expr_ty)), . } 16,848 ( 0.00%) } . . fn cat_res( . &self, . hir_id: HirId, . span: Span, . expr_ty: Ty<'tcx>, . res: Res, . ) -> Result, Cx::Error> { 6,627 ( 0.00%) match res { . Res::Def( . DefKind::Ctor(..) . | DefKind::Const { .. } . | DefKind::ConstParam . | DefKind::AssocConst { .. } . | DefKind::Fn . | DefKind::AssocFn, . _, . ) 825 ( 0.00%) | Res::SelfCtor(..) => Ok(self.cat_rvalue(hir_id, expr_ty)), . . Res::Def(DefKind::Static { .. }, _) => { . Ok(PlaceWithHirId::new(hir_id, expr_ty, PlaceBase::StaticItem, Vec::new())) . } . 2,943 ( 0.00%) Res::Local(var_id) => { 766 ( 0.00%) if self.upvars.is_some_and(|upvars| upvars.contains_key(&var_id)) { . self.cat_upvar(hir_id, var_id) . } else { . Ok(PlaceWithHirId::new(hir_id, expr_ty, PlaceBase::Local(var_id), Vec::new())) . } . } . . def => span_bug!(span, "unexpected definition in ExprUseVisitor: {:?}", def), . } -- line 1433 ---------------------------------------- -- line 1449 ---------------------------------------- . . Ok(PlaceWithHirId::new(hir_id, var_ty, PlaceBase::Upvar(upvar_id), Vec::new())) . } . . fn cat_rvalue(&self, hir_id: HirId, expr_ty: Ty<'tcx>) -> PlaceWithHirId<'tcx> { . PlaceWithHirId::new(hir_id, expr_ty, PlaceBase::Rvalue, Vec::new()) . } . 2,717 ( 0.00%) fn cat_projection( . &self, . node: HirId, . base_place: PlaceWithHirId<'tcx>, . ty: Ty<'tcx>, . kind: ProjectionKind, . ) -> PlaceWithHirId<'tcx> { 418 ( 0.00%) let place_ty = base_place.place.ty(); 1,908 ( 0.00%) => ???:::ty (159x) 836 ( 0.00%) let mut projections = base_place.place.projections; . 1,463 ( 0.00%) let node_ty = self.cx.typeck_results().node_type(node); 6,519 ( 0.00%) => ???:::node_type (159x) 795 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (159x) 1,194 ( 0.00%) if !self.cx.tcx().next_trait_solver_globally() { . // Opaque types can't have field projections, but we can instead convert . // the current place in-place (heh) to the hidden type, and then apply all . // follow up projections on that. . if node_ty != place_ty . && self . .cx 591 ( 0.00%) .structurally_resolve_type(self.cx.tcx().hir_span(base_place.hir_id), place_ty) 21,972 ( 0.00%) => ???:::hir_span (152x) . .is_opaque() . { . projections.push(Projection { kind: ProjectionKind::OpaqueCast, ty: node_ty }); . } . } . projections.push(Projection { kind, ty }); 1,881 ( 0.00%) PlaceWithHirId::new(node, base_place.place.base_ty, base_place.place.base, projections) 1,672 ( 0.00%) } . 22 ( 0.00%) fn cat_overloaded_place( . &self, . expr: &hir::Expr<'_>, . base: &hir::Expr<'_>, . ) -> Result, Cx::Error> { . // Reconstruct the output assuming it's a reference with the . // same region and mutability as the receiver. This holds for . // `Deref(Mut)::Deref(_mut)` and `Index(Mut)::index(_mut)`. 8 ( 0.00%) let place_ty = self.expr_ty(expr)?; 134 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::expr_ty (2x) . let base_ty = self.expr_ty_adjusted(base)?; . 8 ( 0.00%) let ty::Ref(region, _, mutbl) = . *self.cx.structurally_resolve_type(base.span, base_ty).kind() . else { . span_bug!(expr.span, "cat_overloaded_place: base is not a reference"); . }; 2 ( 0.00%) let ref_ty = Ty::new_ref(self.cx.tcx(), region, place_ty, mutbl); . 4 ( 0.00%) let base = self.cat_rvalue(expr.hir_id, ref_ty); 6 ( 0.00%) self.cat_deref(expr.hir_id, base) 566 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_deref (2x) 16 ( 0.00%) } . 4,392 ( 0.00%) fn cat_deref( . &self, . node: HirId, . base_place: PlaceWithHirId<'tcx>, . ) -> Result, Cx::Error> { 732 ( 0.00%) let base_curr_ty = base_place.place.ty(); 1,272 ( 0.00%) => ???:::ty (106x) 732 ( 0.00%) let Some(deref_ty) = self . .cx 1,464 ( 0.00%) .structurally_resolve_type(self.cx.tcx().hir_span(base_place.hir_id), base_curr_ty) 15,264 ( 0.00%) => ???:::hir_span (106x) 1,098 ( 0.00%) .builtin_deref(true) 754 ( 0.00%) => ???:::builtin_deref (106x) . else { . debug!("explicit deref of non-derefable type: {:?}", base_curr_ty); . return Err(self . .cx . .report_bug(self.cx.tcx().hir_span(node), "explicit deref of non-derefable type")); . }; 1,464 ( 0.00%) let mut projections = base_place.place.projections; . projections.push(Projection { kind: ProjectionKind::Deref, ty: deref_ty }); . 4,392 ( 0.00%) Ok(PlaceWithHirId::new(node, base_place.place.base_ty, base_place.place.base, projections)) 2,928 ( 0.00%) } . . /// Returns the variant index for an ADT used within a Struct or TupleStruct pattern . /// Here `pat_hir_id` is the HirId of the pattern itself. 156 ( 0.00%) fn variant_index_for_adt( . &self, . qpath: &hir::QPath<'_>, . pat_hir_id: HirId, . span: Span, . ) -> Result { 117 ( 0.00%) let res = self.cx.typeck_results().qpath_res(qpath, pat_hir_id); 90 ( 0.00%) => ???:::qpath_res (6x) 30 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (6x) 78 ( 0.00%) let ty = self.cx.typeck_results().node_type(pat_hir_id); 246 ( 0.00%) => ???:::node_type (6x) 30 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (6x) 26 ( 0.00%) let ty::Adt(adt_def, _) = self.cx.structurally_resolve_type(span, ty).kind() else { . return Err(self . .cx . .report_bug(span, "struct or tuple struct pattern not applied to an ADT")); . }; . 196 ( 0.00%) match res { 12 ( 0.00%) Res::Def(DefKind::Variant, variant_id) => Ok(adt_def.variant_index_with_id(variant_id)), 14 ( 0.00%) Res::Def(DefKind::Ctor(CtorOf::Variant, ..), variant_ctor_id) => { 14 ( 0.00%) Ok(adt_def.variant_index_with_ctor_id(variant_ctor_id)) 69 ( 0.00%) => ???:::variant_index_with_ctor_id (2x) 7 ( 0.00%) } . Res::Def(DefKind::Ctor(CtorOf::Struct, ..), _) . | Res::Def(DefKind::Struct | DefKind::Union | DefKind::TyAlias | DefKind::AssocTy, _) . | Res::SelfCtor(..) . | Res::SelfTyParam { .. } . | Res::SelfTyAlias { .. } => { . // Structs and Unions have only have one variant. . Ok(FIRST_VARIANT) . } . _ => bug!("expected ADT path, found={:?}", res), . } 104 ( 0.00%) } . . /// Returns the total number of fields in an ADT variant used within a pattern. . /// Here `pat_hir_id` is the HirId of the pattern itself. . fn total_fields_in_adt_variant( . &self, . pat_hir_id: HirId, . variant_index: VariantIdx, . span: Span, . ) -> Result { 35 ( 0.00%) let ty = self.cx.typeck_results().node_type(pat_hir_id); 10 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (2x) 82 ( 0.00%) => ???:::node_type (2x) 14 ( 0.00%) match self.cx.structurally_resolve_type(span, ty).kind() { 7 ( 0.00%) ty::Adt(adt_def, _) => Ok(adt_def.variant(variant_index).fields.len()), . _ => { . self.cx . .tcx() . .dcx() . .span_bug(span, "struct or tuple struct pattern not applied to an ADT"); . } . } . } -- line 1580 ---------------------------------------- -- line 1590 ---------------------------------------- . } . . /// Here, `place` is the `PlaceWithHirId` being matched and pat is the pattern it . /// is being matched against. . /// . /// In general, the way that this works is that we walk down the pattern, . /// constructing a `PlaceWithHirId` that represents the path that will be taken . /// to reach the value being matched. 528 ( 0.00%) fn cat_pattern( . &self, . mut place_with_id: PlaceWithHirId<'tcx>, . pat: &hir::Pat<'_>, . op: &mut F, . ) -> Result<(), Cx::Error> . where . F: FnMut(&PlaceWithHirId<'tcx>, &hir::Pat<'_>) -> Result<(), Cx::Error>, . { -- line 1606 ---------------------------------------- -- line 1631 ---------------------------------------- . // Some(x, ) => { ... }, . // _ => { ... }, . // } . // ``` . // . // Then we see that to get the same result, we must start with . // `deref { deref { place_foo }}` instead of `place_foo` since the pattern is now `Some(x,)` . // and not `&&Some(x,)`, even though its assigned type is that of `&&Some(x,)`. 96 ( 0.00%) let typeck_results = self.cx.typeck_results(); 10 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (2x) . let adjustments: &[adjustment::PatAdjustment<'tcx>] = 144 ( 0.00%) typeck_results.pat_adjustments().get(pat.hir_id).map_or(&[], |v| &**v); . let mut adjusts = adjustments.iter().peekable(); . while let Some(adjust) = adjusts.next() { . debug!("applying adjustment to place_with_id={:?}", place_with_id); . place_with_id = match adjust.kind { . adjustment::PatAdjust::BuiltinDeref => self.cat_deref(pat.hir_id, place_with_id)?, . adjustment::PatAdjust::OverloadedDeref => { . // This adjustment corresponds to an overloaded deref; unless it's on a box, it . // borrows the scrutinee to call `Deref::deref` or `DerefMut::deref_mut`. Invoke -- line 1649 ---------------------------------------- -- line 1669 ---------------------------------------- . })?; . let kind = ProjectionKind::Field(FieldIdx::ZERO, FIRST_VARIANT); . place_with_id = self.cat_projection(pat.hir_id, place_with_id, target_ty, kind); . self.cat_deref(pat.hir_id, place_with_id)? . } . }; . } . drop(typeck_results); // explicitly release borrow of typeck results, just in case. 576 ( 0.00%) let place_with_id = place_with_id; // lose mutability . debug!("applied adjustment derefs to get place_with_id={:?}", place_with_id); . . // Invoke the callback, but only now, after the `place_with_id` has adjusted. . // . // To see that this makes sense, consider `match &Some(3) { Some(x) => { ... }}`. In that . // case, the initial `place_with_id` will be that for `&Some(3)` and the pattern is `Some(x)`. We . // don't want to call `op` with these incompatible values. As written, what happens instead . // is that `op` is called with the adjusted place (that for `*&Some(3)`) and the pattern . // `Some(x)` (which matches). Recursing once more, `*&Some(3)` and the pattern `Some(x)` . // result in the place `Downcast(*&Some(3)).0` associated to `x` and invoke `op` with . // that (where the `ref` on `x` is implied). 96 ( 0.00%) op(&place_with_id, pat)?; 92 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::walk_pat::{closure#0} (2x) . 483 ( 0.00%) match pat.kind { . PatKind::Tuple(subpats, dots_pos) => { . // (p1, ..., pN) . let total_fields = self.total_fields_in_tuple(pat.hir_id, pat.span)?; . . for (i, subpat) in subpats.iter().enumerate_and_adjust(total_fields, dots_pos) { . let subpat_ty = self.pat_ty_adjusted(subpat)?; . let projection_kind = . ProjectionKind::Field(FieldIdx::from_usize(i), FIRST_VARIANT); -- line 1699 ---------------------------------------- -- line 1702 ---------------------------------------- . place_with_id.clone(), . subpat_ty, . projection_kind, . ); . self.cat_pattern(sub_place, subpat, op)?; . } . } . 28 ( 0.00%) PatKind::TupleStruct(ref qpath, subpats, dots_pos) => { . // S(p1, ..., pN) 7 ( 0.00%) let variant_index = self.variant_index_for_adt(qpath, pat.hir_id, pat.span)?; 337 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::variant_index_for_adt (2x) . let total_fields = . self.total_fields_in_adt_variant(pat.hir_id, variant_index, pat.span)?; . . for (i, subpat) in subpats.iter().enumerate_and_adjust(total_fields, dots_pos) { 14 ( 0.00%) let subpat_ty = self.pat_ty_adjusted(subpat)?; 268 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::pat_ty_adjusted (2x) . let projection_kind = . ProjectionKind::Field(FieldIdx::from_usize(i), variant_index); 84 ( 0.00%) let sub_place = self.cat_projection( 368 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_projection (2x) . pat.hir_id, . place_with_id.clone(), . subpat_ty, . projection_kind, . ); 35 ( 0.00%) self.cat_pattern(sub_place, subpat, op)?; 692 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_pattern::<>::walk_pat::{closure#0}>'2 (2x) . } . } . 12 ( 0.00%) PatKind::Struct(ref qpath, field_pats, _) => { . // S { f1: p1, ..., fN: pN } . 30 ( 0.00%) let variant_index = self.variant_index_for_adt(qpath, pat.hir_id, pat.span)?; 294 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::variant_index_for_adt (2x) . . for fp in field_pats { 20 ( 0.00%) let field_ty = self.pat_ty_adjusted(fp.pat)?; 318 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::pat_ty_adjusted (2x) . let field_index = self . .cx 5 ( 0.00%) .typeck_results() 10 ( 0.00%) => ???:<(&rustc_lint::context::LateContext, rustc_span::def_id::LocalDefId) as rustc_hir_typeck::expr_use_visitor::TypeInformationCtxt>::typeck_results (2x) . .field_indices() 10 ( 0.00%) .get(fp.hir_id) . .cloned() . .expect("no index for a field"); . 65 ( 0.00%) let field_place = self.cat_projection( 368 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_projection (2x) . pat.hir_id, . place_with_id.clone(), . field_ty, . ProjectionKind::Field(field_index, variant_index), . ); 25 ( 0.00%) self.cat_pattern(field_place, fp.pat, op)?; 19,568 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::cat_pattern::<>::walk_pat::{closure#0}>'2 (2x) . } . } . . PatKind::Or(pats) => { . for pat in pats { . self.cat_pattern(place_with_id.clone(), pat, op)?; . } . } -- line 1759 ---------------------------------------- -- line 1823 ---------------------------------------- . | PatKind::Missing . | PatKind::Wild . | PatKind::Err(_) => { . // always ok . } . } . . Ok(()) 384 ( 0.00%) } . . /// Represents the place matched on by a deref pattern's interior. . fn pat_deref_place( . &self, . hir_id: HirId, . base_place: PlaceWithHirId<'tcx>, . inner: &hir::Pat<'_>, . target_ty: Ty<'tcx>, -- line 1839 ---------------------------------------- -- line 1852 ---------------------------------------- . } . } . } . . /// Checks whether a type has multiple variants, and therefore, whether a . /// read of the discriminant might be necessary. . #[instrument(skip(self, span), level = "debug")] . fn is_multivariant_adt(&self, ty: Ty<'tcx>, span: Span) -> bool { 26 ( 0.00%) if let ty::Adt(def, _) = self.cx.structurally_resolve_type(span, ty).kind() { . // We treat non-exhaustive enums the same independent of the crate they are . // defined in, to avoid differences in the operational semantics between crates. 26 ( 0.00%) def.variants().len() > 1 || def.is_variant_list_non_exhaustive() . } else { . false . } . } . } . . struct ExprPlaceDelegate; . -- line 1871 ---------------------------------------- 22,346 ( 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 { 559,314 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { . use self::Expression::{Bool, RetBool}; 124,292 ( 0.00%) if !e.span.from_expansion() . && let Some(higher::If { . cond, . then, . r#else: Some(else_expr), . }) = higher::If::hir(e) 498 ( 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); . }, . ); . }; 708 ( 0.00%) if let Some(a) = fetch_bool_block(then) 6,794 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_lints::needless_bool::fetch_bool_block (177x) . && 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), . _ => (), . } . } 887 ( 0.00%) if let Some((lhs_a, a)) = fetch_assign(then) 3,925 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_lints::needless_bool::fetch_assign (177x) 8 ( 0.00%) && let Some((lhs_b, b)) = fetch_assign(else_expr) 64 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_lints::needless_bool::fetch_assign (2x) . && 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:?};") . } else { -- line 203 ---------------------------------------- -- line 214 ---------------------------------------- . e.span, . "this if-then-else expression assigns a bool literal", . "you can reduce it to", . sugg, . applicability, . ); . } . } 497,168 ( 0.01%) } . 38,227 ( 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. 16,383 ( 0.00%) if let Some(tail) = block.expr 7,578 ( 0.00%) && !tail.span.from_expansion() 8,547 ( 0.00%) && let [.., last_stmt] = block.stmts 3,819 ( 0.00%) && let StmtKind::Semi(if_expr) | StmtKind::Expr(if_expr) = last_stmt.kind 1,092 ( 0.00%) && !if_expr.span.from_expansion() . && let Some(higher::If { . cond, . then, . r#else: None, . }) = higher::If::hir(if_expr) 714 ( 0.00%) && let ExprKind::Ret(Some(ret)) = peel_blocks_with_stmt(then).kind 2,569 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_blocks_with_stmt (123x) 216 ( 0.00%) && let Some((then_func, then_val)) = fetch_bool_and_wrapper(ret) 1,524 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/needless_bool.rs:clippy_lints::needless_bool::fetch_bool_and_wrapper (72x) . && let Some((tail_func, tail_val)) = fetch_bool_and_wrapper(tail) . // `if c { return Ok(true) } Ok(true)` is always the same value; the condition might . // have side effects, so don't touch it. Comparing the values here is cheap, so do it . // before the constructor resolution in `wrapper_ctors_match`, which needs `qpath_res`. . && then_val != tail_val . && wrapper_ctors_match(cx, then_func, tail_func) . { . let span = if_expr.span.to(tail.span); -- line 252 ---------------------------------------- -- line 274 ---------------------------------------- . NEEDLESS_BOOL, . span, . "this `if` guard returns a bool literal and is followed by another", . "you can reduce it to", . sugg, . applicability, . ); . } 43,688 ( 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)> { . let expr = peel_blocks(expr); . if let Some(value) = fetch_bool_expr(expr) { . return Some((None, value)); . } 320 ( 0.00%) if let ExprKind::Call(func, [arg]) = expr.kind . && let Some(value) = fetch_bool_expr(arg) . { . return Some((Some(func), value)); . } . None 72 ( 0.00%) } . . /// Checks whether two optional wrapper-constructor call expressions (as returned by . /// [`fetch_bool_and_wrapper`]) are absent on both sides, or call the same tuple-like constructor. . fn wrapper_ctors_match(cx: &LateContext<'_>, a: Option<&Expr<'_>>, b: Option<&Expr<'_>>) -> bool { . fn resolve_ctor(cx: &LateContext<'_>, func: &Expr<'_>) -> Option { . if let ExprKind::Path(qpath) = &func.kind . && let Res::Def(DefKind::Ctor(..), did) = cx.qpath_res(qpath, func.hir_id) . { -- line 309 ---------------------------------------- -- line 319 ---------------------------------------- . } . . enum Expression { . Bool(bool), . RetBool(bool), . } . . fn fetch_bool_block(expr: &Expr<'_>) -> Option { 570 ( 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)?)), . } 177 ( 0.00%) } . . fn fetch_bool_expr(expr: &Expr<'_>) -> Option { 2 ( 0.00%) if let ExprKind::Lit(lit_ptr) = peel_blocks(expr).kind 26 ( 0.00%) && let LitKind::Bool(value) = lit_ptr.node . { . return Some(value); . } . None . } . . fn fetch_assign<'tcx>(expr: &'tcx Expr<'tcx>) -> Option<(&'tcx Expr<'tcx>, bool)> { 748 ( 0.00%) if let ExprKind::Assign(lhs, rhs, _) = peel_blocks_with_stmt(expr).kind { . fetch_bool_expr(rhs).map(|b| (lhs, b)) . } else { . None . } 179 ( 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 ---------------------------------------- 4,194 ( 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 { 79,272 ( 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. 5,572 ( 0.00%) #[derive(Clone, Copy, PartialEq, Eq, Hash, Encodable, Decodable, Debug, StableHash)] . pub enum LitKind { . Bool, // AST only, must never appear in a `Token` . Byte, . Char, . Integer, // e.g. `1`, `1u8`, `1f32` . Float, // e.g. `1.`, `1.0`, `1e3f32` . Str, . StrRaw(u8), // raw string delimited by `n` hash symbols -- line 196 ---------------------------------------- -- line 197 ---------------------------------------- . ByteStr, . ByteStrRaw(u8), // raw byte string delimited by `n` hash symbols . CStr, . CStrRaw(u8), . Err(ErrorGuaranteed), . } . . /// A literal token. 20 ( 0.00%) #[derive(Clone, Copy, PartialEq, Eq, Hash, Encodable, Decodable, Debug, StableHash)] . pub struct Lit { . pub kind: LitKind, . pub symbol: Symbol, . pub suffix: Option, . } . . impl Lit { . pub fn new(kind: LitKind, symbol: Symbol, suffix: Option) -> Lit { -- line 213 ---------------------------------------- 4,848 ( 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>) { 124,292 ( 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/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 { 12,628 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 3,840 ( 0.00%) let ItemKind::Struct(_, _, ref st) = item.kind else { . return; . }; . 464 ( 0.00%) let mut fields = st.fields().iter(); 1,392 ( 0.00%) => ???:::fields (232x) . 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 { 493 ( 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; 10 ( 0.00%) } else if all_pub && !field.vis.kind.is_pub() { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then(cx, PARTIAL_PUB_FIELDS, field.vis.span, msg, |diag| { . diag.help("consider using public field here"); . }); . return; . } . } 14,432 ( 0.00%) } . } 788 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_range_patterns.rs -------------------------------------------------------------------------------- Ir -- line 34 ---------------------------------------- . pub MANUAL_RANGE_PATTERNS, . complexity, . "manually writing range patterns using a combined OR pattern (`|`)" . } . . declare_lint_pass!(ManualRangePatterns => [MANUAL_RANGE_PATTERNS]); . . fn expr_as_i128(expr: &PatExpr<'_>) -> Option { 14 ( 0.00%) if let PatExprKind::Lit { lit, negated } = expr.kind 6 ( 0.00%) && let LitKind::Int(num, _) = lit.node . { . // Intentionally not handling numbers greater than i128::MAX (for u128 literals) for now. . let n = i128::try_from(num.get()).ok()?; . Some(if negated { -n } else { n }) . } else { . None . } . } -- line 51 ---------------------------------------- -- line 60 ---------------------------------------- . fn new(expr: &PatExpr<'_>) -> Option { . Some(Self { . val: expr_as_i128(expr)?, . span: expr.span, . }) . } . . fn dummy(val: i128) -> Self { 96 ( 0.00%) Self { val, span: DUMMY_SP } . } . . fn min(self, other: Self) -> Self { . if self.val < other.val { self } else { other } . } . } . . impl LateLintPass<'_> for ManualRangePatterns { 102,936 ( 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) 25,808 ( 0.00%) if let PatKind::Or(pats) = pat.kind 137 ( 0.00%) && (pats.len() >= 3 || (pats.len() > 1 && pats.iter().any(|p| matches!(p.kind, PatKind::Range(..))))) 64 ( 0.00%) && !pat.span.in_external_macro(cx.sess().source_map()) . { . let mut min = Num::dummy(i128::MAX); . let mut max = Num::dummy(i128::MIN); 16 ( 0.00%) let mut range_kind = RangeEnd::Included; . let mut numbers_found = FxHashSet::default(); . let mut ranges_found = Vec::new(); . . for pat in pats { 75 ( 0.00%) if let PatKind::Expr(lit) = pat.kind . && let Some(num) = Num::new(lit) . { . numbers_found.insert(num.val); . . min = min.min(num); . if num.val >= max.val { . max = num; . range_kind = RangeEnd::Included; . } 12 ( 0.00%) } else if let PatKind::Range(Some(left), Some(right), end) = pat.kind . && let Some(left) = Num::new(left) . && let Some(mut right) = Num::new(right) . { . if let RangeEnd::Excluded = end { . right.val -= 1; . } . . min = min.min(left); -- line 110 ---------------------------------------- -- line 151 ---------------------------------------- . "try", . format!("{min}{range_kind}{max}"), . Applicability::MachineApplicable, . ); . } . }, . ); . } 102,936 ( 0.00%) } . } 133 ( 0.00%) -------------------------------------------------------------------------------- -- 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}; . 14,544 ( 0.00%) pub(super) fn check(cx: &EarlyContext<'_>, lit_span: Span, lit_snip: &str, suffix: &str, sugg_type: &str) { 2,424 ( 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. 2,424 ( 0.00%) if !suffix.is_empty() { 24 ( 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")] 12 ( 0.00%) span_lint_and_then( . cx, . UNSEPARATED_LITERAL_SUFFIX, . lit_span, 18 ( 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, . ); . }, . ); . } . } 9,696 ( 0.00%) } 30 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/dep_graph/graph.rs -------------------------------------------------------------------------------- Ir -- line 60 ---------------------------------------- . . /// This field is used for assigning DepNodeIndices when running in . /// non-incremental mode. Even in non-incremental mode we make sure that . /// each task has a `DepNodeIndex` that uniquely identifies it. This unique . /// ID is used for self-profiling. . virtual_dep_node_index: Arc, . } . 152,001 ( 0.00%) rustc_index::newtype_index! { . pub struct DepNodeIndex {} . } . . // We store a large collection of these in `prev_index_to_index` during . // non-full incremental builds, and want to ensure that the element size . // doesn't inadvertently increase. . rustc_data_structures::static_assert_size!(Option, 4); . -- line 76 ---------------------------------------- -- line 500 ---------------------------------------- . hashing_timer.finish_with_query_invocation_id(dep_node_index.into()); . dep_node_index . } . } . . impl DepGraph { . #[inline] . pub fn read_index(&self, dep_node_index: DepNodeIndex) { 262,467 ( 0.01%) if let Some(ref data) = self.data { . read_deps(|task_deps| { 260,286 ( 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 ---------------------------------------- 79,132 ( 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) { 85,712 ( 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) { 5,031 ( 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: /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,267 ( 0.00%) folder.try_fold_ty(self) 2,582,340 ( 0.07%) => ???:>::try_fold_ty (606x) . } . 235 ( 0.00%) fn fold_with>>(self, folder: &mut F) -> Self { 25,846 ( 0.00%) folder.fold_ty(self) 143,706 ( 0.00%) => ???:>::fold_ty (2x) . } . } . . impl<'tcx> TypeVisitable> for Ty<'tcx> { . fn visit_with>>(&self, visitor: &mut V) -> V::Result { 9,017 ( 0.00%) visitor.visit_ty(*self) 594 ( 0.00%) => ???:>::visit_ty (10x) . } . } . . 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) }) . } . 48,366 ( 0.00%) fn super_fold_with>>(self, folder: &mut F) -> Self { 32,244 ( 0.00%) let kind = match *self.kind() { . ty::RawPtr(ty, mutbl) => ty::RawPtr(ty.fold_with(folder), mutbl), 969 ( 0.00%) ty::Array(typ, sz) => ty::Array(typ.fold_with(folder), sz.fold_with(folder)), 28 ( 0.00%) ty::Slice(typ) => ty::Slice(typ.fold_with(folder)), 3,852 ( 0.00%) ty::Adt(tid, args) => ty::Adt(tid, args.fold_with(folder)), 276,911 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/generic_args.rs:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::generic_args::GenericArg> as rustc_type_ir::fold::TypeFoldable>::fold_with::> (561x) 90 ( 0.00%) ty::Dynamic(trait_ty, region) => { . ty::Dynamic(trait_ty.fold_with(folder), region.fold_with(folder)) 45 ( 0.00%) } 309 ( 0.00%) ty::Tuple(ts) => ty::Tuple(ts.fold_with(folder)), 74,194 ( 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::> (55x) 3,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/ty/generic_args.rs:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::fold::TypeFoldable>::fold_with::>'2 (4x) 112 ( 0.00%) 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), 28 ( 0.00%) ty::UnsafeBinder(f) => ty::UnsafeBinder(f.fold_with(folder)), 29,981 ( 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)), 36 ( 0.00%) 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 . | ty::Char . | ty::Str . | ty::Int(_) . | ty::Uint(_) . | ty::Float(_) -- line 423 ---------------------------------------- -- line 425 ---------------------------------------- . | ty::Infer(_) . | ty::Param(..) . | ty::Bound(..) . | ty::Placeholder(..) . | ty::Never . | ty::Foreign(..) => return self, . }; . 48,341 ( 0.00%) if *self.kind() == kind { self } else { folder.cx().mk_ty_from_kind(kind) } 76,971 ( 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 (4,702x) 48,366 ( 0.00%) } . } . . impl<'tcx> TypeSuperVisitable> for Ty<'tcx> { . fn super_visit_with>>(&self, visitor: &mut V) -> V::Result { 512 ( 0.00%) match self.kind() { . ty::RawPtr(ty, _mutbl) => ty.visit_with(visitor), . ty::Array(typ, sz) => { . try_visit!(typ.visit_with(visitor)); . sz.visit_with(visitor) . } . ty::Slice(typ) => typ.visit_with(visitor), 128 ( 0.00%) ty::Adt(_, args) => args.visit_with(visitor), . ty::Dynamic(trait_ty, reg) => { . try_visit!(trait_ty.visit_with(visitor)); . reg.visit_with(visitor) . } . ty::Tuple(ts) => ts.visit_with(visitor), . ty::FnDef(_, args) => args.visit_with(visitor), . ty::FnPtr(sig_tys, _) => sig_tys.visit_with(visitor), . ty::UnsafeBinder(f) => f.visit_with(visitor), -- line 454 ---------------------------------------- -- line 595 ---------------------------------------- . fn try_fold_with>>( . self, . folder: &mut F, . ) -> Result { . folder.try_fold_const(self) . } . . fn fold_with>>(self, folder: &mut F) -> Self { 12 ( 0.00%) folder.fold_const(self) 176 ( 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 (4x) . } . } . . 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) } . } . 90 ( 0.00%) fn super_fold_with>>(self, folder: &mut F) -> Self { 70 ( 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, . }; . if kind != self.kind() { folder.cx().mk_ct_from_kind(kind) } else { self } 80 ( 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 771 ---------------------------------------- . ) -> Result { . ty::util::try_fold_list(self, folder, |tcx, v| tcx.$mk(v)) . } . . fn fold_with>>( . self, . folder: &mut F, . ) -> Self { 90 ( 0.00%) ty::util::fold_list(self, folder, |tcx, v| tcx.$mk(v)) 6,840 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/util.rs:rustc_middle::ty::util::fold_list::, &rustc_middle::ty::list::RawList<(), rustc_type_ir::binder::Binder>>, rustc_type_ir::binder::Binder>, <&rustc_middle::ty::list::RawList<(), rustc_type_ir::binder::Binder>> as rustc_type_ir::fold::TypeFoldable>::fold_with>::{closure#0}> (45x) . } . } . )* . } . } . . list_fold! { . &'tcx ty::List> : mk_poly_existential_predicates, -- line 787 ---------------------------------------- 13,909 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/ifs/if_same_then_else.rs -------------------------------------------------------------------------------- Ir -- line 2 ---------------------------------------- . use clippy_utils::diagnostics::span_lint_and_note; . use clippy_utils::higher::has_let_expr; . use rustc_hir::{Block, Expr}; . use rustc_lint::LateContext; . use rustc_span::SyntaxContext; . . use super::IF_SAME_THEN_ELSE; . 8,190 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, conds: &[&Expr<'_>], blocks: &[&Block<'_>]) -> bool { . let mut eq = SpanlessEq::new(cx); . blocks . .array_windows::<2>() . .enumerate() . .fold(true, |all_eq, (i, &[lhs, rhs])| { 1,960 ( 0.00%) if eq.eq_block(SyntaxContext::root(), lhs, rhs) 390,425 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_block (280x) . && !has_let_expr(conds[i]) . && conds.get(i + 1).is_none_or(|e| !has_let_expr(e)) . { . span_lint_and_note( . cx, . IF_SAME_THEN_ELSE, . lhs.span, . "this `if` has identical blocks", -- line 24 ---------------------------------------- -- line 25 ---------------------------------------- . Some(rhs.span), . "same as this", . ); . all_eq . } else { . false . } . }) 9,295 ( 0.00%) } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/mem_replace.rs -------------------------------------------------------------------------------- Ir -- line 127 ---------------------------------------- . impl_lint_pass!(MemReplace => [ . MEM_REPLACE_OPTION_WITH_NONE, . MEM_REPLACE_OPTION_WITH_SOME, . MEM_REPLACE_WITH_DEFAULT, . MEM_REPLACE_WITH_UNINIT, . ]); . . fn check_replace_option_with_none(cx: &LateContext<'_>, src: &Expr<'_>, dest: &Expr<'_>, expr_span: Span) -> bool { 60 ( 0.00%) if is_none_expr(cx, src) { 452 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_utils::is_none_expr (12x) . // Since this is a late pass (already type-checked), . // and we already know that the second argument is an . // `Option`, we do not need to check the first . // argument's type. All that's left is to get . // the replacee's expr after peeling off the `&mut` . let sugg_expr = peel_ref_operators(cx, dest); . let mut applicability = Applicability::MachineApplicable; . span_lint_and_sugg( -- line 143 ---------------------------------------- -- line 160 ---------------------------------------- . . fn check_replace_option_with_some( . cx: &LateContext<'_>, . src: &Expr<'_>, . dest: &Expr<'_>, . expr_span: Span, . msrv: Msrv, . ) -> bool { 60 ( 0.00%) if let Some(src_arg) = as_some_expr(cx, src) 246 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::as_some_expr (12x) . && msrv.meets(cx, msrvs::OPTION_REPLACE) . { . // We do not have to check for a `const` context here, because `core::mem::replace()` and . // `Option::replace()` have been const-stabilized simultaneously in version 1.83.0. . let sugg_expr = peel_ref_operators(cx, dest); . let mut applicability = Applicability::MachineApplicable; . span_lint_and_sugg( . cx, -- line 176 ---------------------------------------- -- line 186 ---------------------------------------- . applicability, . ); . true . } else { . false . } . } . 63 ( 0.00%) fn check_replace_with_uninit(cx: &LateContext<'_>, src: &Expr<'_>, dest: &Expr<'_>, expr_span: Span) { 72 ( 0.00%) if let Some(method_def_id) = cx.typeck_results().type_dependent_def_id(src.hir_id) 362 ( 0.00%) => ???:::type_dependent_def_id (9x) . // check if replacement is mem::MaybeUninit::uninit().assume_init() 14 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::assume_init, method_def_id) 108 ( 0.00%) => ???:::is_diagnostic_item (2x) . { . let Some(top_crate) = std_or_core(cx) else { return }; . let mut applicability = Applicability::MachineApplicable; . span_lint_and_sugg( . cx, . MEM_REPLACE_WITH_UNINIT, . expr_span, . "replacing with `mem::MaybeUninit::uninit().assume_init()`", -- line 205 ---------------------------------------- -- line 208 ---------------------------------------- . "{top_crate}::ptr::read({})", . snippet_with_applicability(cx, dest.span, "", &mut applicability) . ), . applicability, . ); . return; . } . 26 ( 0.00%) if let ExprKind::Call(repl_func, []) = src.kind 6 ( 0.00%) && let ExprKind::Path(ref repl_func_qpath) = repl_func.kind 10 ( 0.00%) && let Some(repl_def_id) = cx.qpath_res(repl_func_qpath, repl_func.hir_id).opt_def_id() 156 ( 0.00%) => ???:::qpath_res (2x) . { 6 ( 0.00%) let repl_name = cx.tcx.get_diagnostic_name(repl_def_id); 106 ( 0.00%) => ???:::get_diagnostic_name (2x) . if repl_name == Some(sym::mem_uninitialized) { . let Some(top_crate) = std_or_core(cx) else { return }; . let mut applicability = Applicability::MachineApplicable; . span_lint_and_sugg( . cx, . MEM_REPLACE_WITH_UNINIT, . expr_span, . "replacing with `mem::uninitialized()`", -- line 228 ---------------------------------------- -- line 239 ---------------------------------------- . MEM_REPLACE_WITH_UNINIT, . expr_span, . "replacing with `mem::zeroed()`", . None, . "consider using a default value or the `take_mut` crate instead", . ); . } . } 72 ( 0.00%) } . 156 ( 0.00%) fn check_replace_with_default( . cx: &LateContext<'_>, . src: &Expr<'_>, . dest: &Expr<'_>, . expr: &Expr<'_>, . msrv: Msrv, . ) -> bool { 72 ( 0.00%) if is_expr_used_or_unified(cx.tcx, expr) 3,030 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expr_used_or_unified (12x) . // disable lint for primitives 24 ( 0.00%) && let expr_type = cx.typeck_results().expr_ty_adjusted(src) 843 ( 0.00%) => ???:::expr_ty_adjusted (12x) . && !is_non_aggregate_primitive_type(expr_type) 55 ( 0.00%) && is_default_equivalent(cx, src) 14,142 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_default_equivalent (11x) 12 ( 0.00%) && !expr.span.in_external_macro(cx.tcx.sess.source_map()) 18 ( 0.00%) && let Some(top_crate) = std_or_core(cx) 585 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::std_or_core (3x) 18 ( 0.00%) && msrv.meets(cx, msrvs::MEM_TAKE) 81 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (3x) . { 30 ( 0.00%) span_lint_and_then( 819,125 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (3x) . cx, . MEM_REPLACE_WITH_DEFAULT, . expr.span, . "replacing a value of type `T` with `T::default()`", 15 ( 0.00%) |diag| { 3 ( 0.00%) let mut applicability = Applicability::MachineApplicable; 21 ( 0.00%) let (dest_snip, _) = snippet_with_context(cx, dest.span, expr.span.ctxt(), "", &mut applicability); 21 ( 0.00%) let suggestion = format!("{top_crate}::mem::take({dest_snip})"); . . diag.span_suggestion( 3 ( 0.00%) expr.span, 6 ( 0.00%) format!("consider using `{top_crate}::mem::take` instead"), 9 ( 0.00%) suggestion, . applicability, . ); . }, . ); . true . } else { . false . } 96 ( 0.00%) } . . pub struct MemReplace { . msrv: Msrv, . } . . impl MemReplace { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl<'tcx> LateLintPass<'tcx> for MemReplace { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 137,354 ( 0.00%) if let ExprKind::Call(func, [dest, src]) = expr.kind . // Check that `expr` is a call to `mem::replace()` 1,914 ( 0.00%) && let ExprKind::Path(ref func_qpath) = func.kind 2,552 ( 0.00%) && let Some(def_id) = cx.qpath_res(func_qpath, func.hir_id).opt_def_id() 35,139 ( 0.00%) => ???:::qpath_res (638x) 3,768 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::mem_replace, def_id) 49,019 ( 0.00%) => ???:::is_diagnostic_item (628x) . // Check that second argument is `Option::None` 12 ( 0.00%) && !check_replace_option_with_none(cx, src, dest, expr.span) 12 ( 0.00%) && !check_replace_option_with_some(cx, src, dest, expr.span, self.msrv) 96 ( 0.00%) && !check_replace_with_default(cx, src, dest, expr, self.msrv) 838,725 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/mem_replace.rs:clippy_lints::mem_replace::check_replace_with_default (12x) . { 54 ( 0.00%) check_replace_with_uninit(cx, src, dest, expr.span); 1,082 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mem_replace.rs:clippy_lints::mem_replace::check_replace_with_uninit (9x) . } 497,168 ( 0.01%) } . } 2,608 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.15.0/src/tuple_impl.rs -------------------------------------------------------------------------------- Ir -- line 185 ---------------------------------------- . impl Iterator for TupleWindows . where . I: Iterator, . T: HomogeneousTuple + Clone, . T::Item: Clone, . { . type Item = T; . 6,462 ( 0.00%) fn next(&mut self) -> Option { . if T::num_items() == 1 { . return T::collect_from_iter_no_buf(&mut self.iter); . } 5,976 ( 0.00%) if let Some(new) = self.iter.next() { 4,252 ( 0.00%) if let Some(ref mut last) = self.last { . last.left_shift_push(new); 5,448 ( 0.00%) Some(last.clone()) . } else { . use std::iter::once; . let iter = once(new).chain(&mut self.iter); 2,376 ( 0.00%) self.last = T::collect_from_iter_no_buf(iter); 11,576 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.15.0/src/tuple_impl.rs:<(clippy_lints::manual_clamp::MaybeBorrowedStmtKind, clippy_lints::manual_clamp::MaybeBorrowedStmtKind) as itertools::tuple_impl::TupleCollect>::collect_from_iter_no_buf::, &mut core::iter::adapters::chain::Chain, clippy_lints::manual_clamp::block_stmt_with_last::{closure#0}>, core::option::IntoIter>>> (396x) . self.last.clone() . } . } else { 396 ( 0.00%) None . } 10,770 ( 0.00%) } . . fn size_hint(&self) -> (usize, Option) { . let mut sh = self.iter.size_hint(); . // Adjust the size hint at the beginning . // OR when `num_items == 1` (but it does not change the size hint). . if self.last.is_none() { . sh = size_hint::sub_scalar(sh, T::num_items() - 1); . } -- line 218 ---------------------------------------- -- line 366 ---------------------------------------- . if i < s.len() { . s[i] = $Y; . i += 1; . } . )* . return None; . } . 396 ( 0.00%) fn collect_from_iter_no_buf(iter: I) -> Option . where I: IntoIterator . { . let mut iter = iter.into_iter(); . 2,376 ( 0.00%) Some(($( . { let $Y = iter.next()?; $Y }, . )*)) 396 ( 0.00%) } . . fn num_items() -> usize { . count_ident!($($Y)*) . } . . /// Shift all elements one position to the left and push the new item to the end. . fn left_shift_push(&mut self, mut item: A) { . use std::mem::replace; -- line 390 ---------------------------------------- 3,342 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/duplicate_mod.rs -------------------------------------------------------------------------------- Ir -- line 49 ---------------------------------------- . impl_lint_pass!(DuplicateMod => [DUPLICATE_MOD]); . . struct Modules { . local_path: PathBuf, . spans: Vec, . lint_level_specs: Vec, . } . 2 ( 0.00%) #[derive(Default)] . pub struct DuplicateMod { . /// map from the canonicalized path to `Modules`, `BTreeMap` to make the . /// order deterministic for tests . modules: BTreeMap, . } . . impl EarlyLintPass for DuplicateMod { 12,628 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 3,904 ( 0.00%) if let ItemKind::Mod(_, _, ModKind::Loaded(_, Inline::No { .. }, mod_spans)) = &item.kind 1,156 ( 0.00%) && let FileName::Real(real) = cx.sess().source_map().span_to_filename(mod_spans.inner_span) 58,474 ( 0.00%) => ???:::span_to_filename (68x) 136 ( 0.00%) && let Some(local_path) = real.into_local_path() 612 ( 0.00%) && let Ok(absolute_path) = local_path.canonicalize() . { 748 ( 0.00%) let modules = self.modules.entry(absolute_path).or_insert(Modules { 378,068 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/collections/btree/map.rs:>::entry (68x) 13,712 ( 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 (68x) 204 ( 0.00%) local_path, . spans: Vec::new(), . lint_level_specs: Vec::new(), . }); 204 ( 0.00%) modules.spans.push(item.span_with_attributes()); 13,510 ( 0.00%) => ???:::span_with_attributes (68x) 408 ( 0.00%) modules.lint_level_specs.push(cx.get_lint_level_spec(DUPLICATE_MOD)); 20,968 ( 0.00%) => ???:::get_lint_level_spec (68x) 68 ( 0.00%) } 14,432 ( 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() . { 136 ( 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%) } . } 613 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/loops/utils.rs -------------------------------------------------------------------------------- Ir -- line 6 ---------------------------------------- . use rustc_hir::intravisit::{Visitor, walk_expr, walk_local}; . use rustc_hir::{AssignOpKind, BorrowKind, Expr, ExprKind, HirId, HirIdMap, LetStmt, Mutability, PatKind}; . use rustc_lint::LateContext; . use rustc_middle::hir::nested_filter; . use rustc_middle::ty::{self, Ty}; . use rustc_span::Spanned; . use rustc_span::symbol::{Symbol, sym}; . 5,439 ( 0.00%) #[derive(Debug, PartialEq, Eq)] . enum IncrementVisitorVarState { . Initial, // Not examined yet . IncrOnce, // Incremented exactly once, may be a loop counter . DontWarn, . } . . /// Scan a for loop for variables that are incremented exactly once and not used after that. . pub(super) struct IncrementVisitor<'a, 'tcx> { . cx: &'a LateContext<'tcx>, // context reference . states: HirIdMap, // incremented variables . depth: u32, // depth of conditional expressions . } . . impl<'a, 'tcx> IncrementVisitor<'a, 'tcx> { . pub(super) fn new(cx: &'a LateContext<'tcx>) -> Self { 2,100 ( 0.00%) Self { . cx, . states: HirIdMap::default(), . depth: 0, . } . } . . pub(super) fn into_results(self) -> impl Iterator { . self.states.into_iter().filter_map(|(id, state)| { -- line 38 ---------------------------------------- -- line 42 ---------------------------------------- . None . } . }) . } . } . . impl<'tcx> Visitor<'tcx> for IncrementVisitor<'_, 'tcx> { . fn visit_local(&mut self, l: &'tcx LetStmt<'tcx>) { 810 ( 0.00%) if let Some(init) = l.init { 540 ( 0.00%) self.visit_expr(init); 167,807 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/utils.rs:::visit_expr (127x) 810 ( 0.00%) if let Some(els) = l.els { . self.depth += 1; . self.visit_block(els); . self.depth -= 1; . } . } . } . 42,156 ( 0.00%) fn visit_expr(&mut self, expr: &'tcx Expr<'_>) { . // If node is a variable . if let Some(def_id) = expr.res_local_id() { 9,088 ( 0.00%) if let Some(parent) = get_parent_expr(self.cx, expr) { 595 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (5x) 2,095 ( 0.00%) let state = self.states.entry(def_id).or_insert(IncrementVisitorVarState::Initial); 2,095 ( 0.00%) if *state == IncrementVisitorVarState::IncrOnce { . *state = IncrementVisitorVarState::DontWarn; . return; . } . 15,047 ( 0.00%) match parent.kind { 43 ( 0.00%) ExprKind::AssignOp(op, lhs, rhs) if lhs.hir_id == expr.hir_id => { 15 ( 0.00%) *state = if op.node == AssignOpKind::AddAssign 10 ( 0.00%) && is_integer_literal(rhs, 1) 27 ( 0.00%) && *state == IncrementVisitorVarState::Initial . && self.depth == 0 . { . IncrementVisitorVarState::IncrOnce . } else { . // Assigned some other value or assigned multiple times . IncrementVisitorVarState::DontWarn . }; . }, 254 ( 0.00%) ExprKind::Assign(lhs, _, _) if lhs.hir_id == expr.hir_id => { . *state = IncrementVisitorVarState::DontWarn; . }, . ExprKind::AddrOf(BorrowKind::Ref, Mutability::Mut, _) => { . *state = IncrementVisitorVarState::DontWarn; . }, . _ => (), . } . } . 4,544 ( 0.00%) walk_expr(self, expr); 21,175 ( 0.00%) } else if is_loop(expr) || is_conditional(expr) { 840 ( 0.00%) self.depth += 1; 420 ( 0.00%) walk_expr(self, expr); 659,138 ( 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 (163x) 121,087 ( 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:: (39x) 420 ( 0.00%) self.depth -= 1; . } else if let ExprKind::Continue(_) = expr.kind { . // If we see a `continue` block, then we increment depth so that the IncrementVisitor . // state will be set to DontWarn if we see the variable being modified anywhere afterwards. 37 ( 0.00%) self.depth += 1; . } else { . walk_expr(self, expr); . } 3,199 ( 0.00%) } . } . . enum InitializeVisitorState<'hir> { . Initial, // Not examined yet . Declared(Symbol, Option>), // Declared but not (yet) initialized . Initialized { . name: Symbol, . ty: Option>, -- line 113 ---------------------------------------- -- line 124 ---------------------------------------- . var_id: HirId, . state: InitializeVisitorState<'tcx>, . depth: u32, // depth of conditional expressions . past_loop: bool, . } . . impl<'a, 'tcx> InitializeVisitor<'a, 'tcx> { . pub(super) fn new(cx: &'a LateContext<'tcx>, end_expr: &'tcx Expr<'tcx>, var_id: HirId) -> Self { 9 ( 0.00%) Self { . cx, . end_expr, . var_id, . state: InitializeVisitorState::Initial, . depth: 0, . past_loop: false, . } . } . . pub(super) fn get_result(&self) -> Option<(Symbol, Option>, &'tcx Expr<'tcx>)> { 2 ( 0.00%) if let InitializeVisitorState::Initialized { name, ty, initializer } = self.state { . Some((name, ty, initializer)) . } else { . None . } . } . } . . impl<'tcx> Visitor<'tcx> for InitializeVisitor<'_, 'tcx> { . type NestedFilter = nested_filter::OnlyBodies; . 18 ( 0.00%) fn visit_local(&mut self, l: &'tcx LetStmt<'_>) { . // Look for declarations of the variable 8 ( 0.00%) if l.pat.hir_id == self.var_id 3 ( 0.00%) && let PatKind::Binding(.., ident, _) = l.pat.kind . { . let ty = l.ty.map(|_| self.cx.typeck_results().pat_ty(l.pat)); . 5 ( 0.00%) self.state = l.init.map_or(InitializeVisitorState::Declared(ident.name, ty), |init| { . InitializeVisitorState::Initialized { . initializer: init, . ty, . name: ident.name, . } . }); . } . . walk_local(self, l); 16 ( 0.00%) } . 95 ( 0.00%) fn visit_expr(&mut self, expr: &'tcx Expr<'_>) { 57 ( 0.00%) if matches!(self.state, InitializeVisitorState::DontWarn) { . return; . } 34 ( 0.00%) if expr.hir_id == self.end_expr.hir_id { 2 ( 0.00%) self.past_loop = true; . return; . } . // No need to visit expressions before the variable is . // declared 32 ( 0.00%) if matches!(self.state, InitializeVisitorState::Initial) { . return; . } . . // If node is the desired variable, see how it's used 3 ( 0.00%) if expr.res_local_id() == Some(self.var_id) { 2 ( 0.00%) if self.past_loop { . self.state = InitializeVisitorState::DontWarn; . return; . } . . if let Some(parent) = get_parent_expr(self.cx, expr) { . match parent.kind { . ExprKind::AssignOp(_, lhs, _) if lhs.hir_id == expr.hir_id => { . self.state = InitializeVisitorState::DontWarn; -- line 197 ---------------------------------------- -- line 234 ---------------------------------------- . ExprKind::AddrOf(BorrowKind::Ref, Mutability::Mut, _) => { . self.state = InitializeVisitorState::DontWarn; . }, . _ => (), . } . } . . walk_expr(self, expr); 11 ( 0.00%) } else if !self.past_loop && is_loop(expr) { . self.state = InitializeVisitorState::DontWarn; . } else if is_conditional(expr) { . self.depth += 1; . walk_expr(self, expr); . self.depth -= 1; . } else { . walk_expr(self, expr); . } 36 ( 0.00%) } . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { . self.cx.tcx . } . } . . fn is_loop(expr: &Expr<'_>) -> bool { . matches!(expr.kind, ExprKind::Loop(..)) . } . . fn is_conditional(expr: &Expr<'_>) -> bool { 30 ( 0.00%) matches!(expr.kind, ExprKind::If(..) | ExprKind::Match(..)) . } . . /// If `arg` was the argument to a `for` loop, return the "cleanest" way of writing the . /// actual `Iterator` that the loop uses. . pub(super) fn make_iterator_snippet(cx: &LateContext<'_>, arg: &Expr<'_>, applicability: &mut Applicability) -> String { . let impls_iterator = cx . .tcx . .get_diagnostic_item(sym::Iterator) -- line 271 ---------------------------------------- 51,366 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/temporary_assignment.rs -------------------------------------------------------------------------------- Ir -- line 21 ---------------------------------------- . pub TEMPORARY_ASSIGNMENT, . complexity, . "assignments to temporaries" . } . . declare_lint_pass!(TemporaryAssignment => [TEMPORARY_ASSIGNMENT]); . . fn is_temporary(expr: &Expr<'_>) -> bool { 2,516 ( 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<'_>) { 124,292 ( 0.00%) if let ExprKind::Assign(target, ..) = &expr.kind { . let mut base = target; 5,904 ( 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 ---------------------------------------- 1,258 ( 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 { 90,069 ( 0.00%) fn check_pat(&mut self, cx: &LateContext<'tcx>, ref_pat: &'tcx Pat<'_>) { 26,053 ( 0.00%) if let PatKind::Ref(pat, Pinnedness::Not, Mutability::Not) = ref_pat.kind 126 ( 0.00%) && !ref_pat.span.from_expansion() 63 ( 0.00%) && cx . .tcx 63 ( 0.00%) .hir_parent_iter(ref_pat.hir_id) 99 ( 0.00%) .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 36 ( 0.00%) .all(|pat| !matches!(pat.kind, PatKind::Or(_))) . { 801 ( 0.00%) match pat.kind { . // Check sub_pat got a `ref` keyword (excluding `ref mut`). . PatKind::Binding(BindingMode::REF, _, ident, None) => { . span_lint_and_then( . cx, . NEEDLESS_BORROWED_REFERENCE, . ref_pat.span, . "this pattern takes a reference on something that is being dereferenced", . |diag| { -- line 57 ---------------------------------------- -- line 79 ---------------------------------------- . check_subpatterns( . cx, . "dereferencing a slice pattern where every element takes a reference", . ref_pat, . pat, . itertools::chain(before, after), . ); . }, 12 ( 0.00%) PatKind::Tuple(subpatterns, _) | PatKind::TupleStruct(_, subpatterns, _) => { . check_subpatterns( . cx, . "dereferencing a tuple pattern where every element takes a reference", . ref_pat, . pat, . subpatterns, . ); . }, -- line 95 ---------------------------------------- -- line 100 ---------------------------------------- . ref_pat, . pat, . fields.iter().map(|field| field.pat), . ); . }, . _ => {}, . } . } 102,936 ( 0.00%) } . } . . fn check_subpatterns<'tcx>( . cx: &LateContext<'tcx>, . message: &'static str, . ref_pat: &Pat<'_>, . pat: &Pat<'_>, . subpatterns: impl IntoIterator>, . ) { . let mut suggestions = Vec::new(); . . for subpattern in subpatterns { 72 ( 0.00%) match subpattern.kind { . PatKind::Binding(BindingMode::REF, _, ident, None) => { . // `ref ident` . // ^^^^ . let span = subpattern.span.until(ident.span); . suggestions.push((span, String::new())); . }, . PatKind::Wild => {}, . _ => return, -- line 129 ---------------------------------------- 208 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_let_else.rs -------------------------------------------------------------------------------- Ir -- line 45 ---------------------------------------- . #[clippy::version = "1.67.0"] . pub MANUAL_LET_ELSE, . pedantic, . "manual implementation of a let...else statement" . } . . impl<'tcx> QuestionMark { . pub(crate) fn check_manual_let_else(&self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'tcx>) { 2,066 ( 0.00%) if let StmtKind::Let(local) = stmt.kind 6,198 ( 0.00%) && let Some(init) = local.init 1,956 ( 0.00%) && local.els.is_none() 1,956 ( 0.00%) && local.ty.is_none() 3,808 ( 0.00%) && init.span.eq_ctxt(stmt.span) 11,110 ( 0.00%) && let Some(if_let_or_match) = IfLetOrMatch::parse(cx, init) 38,259 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::parse (1,873x) 1,396 ( 0.00%) && !stmt.span.in_external_macro(cx.sess().source_map()) 41,183 ( 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 (349x) 2,094 ( 0.00%) && self.msrv.meets(cx, msrvs::LET_ELSE) 11,168 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (349x) . { 698 ( 0.00%) match if_let_or_match { . IfLetOrMatch::IfLet(if_let_expr, let_pat, if_then, if_else, ..) => { 8 ( 0.00%) if let Some(ident_map) = expr_simple_identity_map(local.pat, let_pat, if_then) 54 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_let_else.rs:clippy_lints::manual_let_else::expr_simple_identity_map (1x) . && let Some(if_else) = if_else . && is_never_expr(cx, if_else).is_some() . && let qm_allowed = is_lint_allowed(cx, QUESTION_MARK, stmt.hir_id) . && (qm_allowed || pat_and_expr_can_be_question_mark(cx, let_pat, if_else).is_none()) . { . emit_manual_let_else(cx, stmt.span, if_let_expr, &ident_map, let_pat, if_else); . } . }, . IfLetOrMatch::Match(match_expr, arms, source) => { 348 ( 0.00%) if self.matches_behaviour == MatchLintBehaviour::Never { . return; . } 558 ( 0.00%) if source != MatchSource::Normal { . return; . } . // Any other number than two arms doesn't (necessarily) . // have a trivial mapping to let else. . if arms.len() != 2 { . return; . } . // Guards don't give us an easy mapping either . if arms.iter().any(|arm| arm.guard.is_some()) { . return; . } . let check_types = self.matches_behaviour == MatchLintBehaviour::WellKnownTypes; . let diverging_arm_opt = arms.iter().enumerate().find(|(_, arm)| { 650 ( 0.00%) is_never_expr(cx, arm.body).is_some() && pat_allowed_for_else(cx, arm.pat, check_types) 72,500 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_never_expr (113x) . }); . let Some((idx, diverging_arm)) = diverging_arm_opt else { . return; . }; . 392 ( 0.00%) let pat_arm = &arms[1 - idx]; . // If the non-diverging arm is the first one, its pattern can be reused in a let/else statement. . // However, if it arrives in second position, its pattern may cover some cases already covered . // by the diverging one. 334 ( 0.00%) if idx == 0 && !is_arms_disjointed(cx, diverging_arm, pat_arm) { 4,231 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_let_else.rs:clippy_lints::manual_let_else::is_arms_disjointed (37x) . return; . } . 562 ( 0.00%) let Some(ident_map) = expr_simple_identity_map(local.pat, pat_arm.pat, pat_arm.body) else { 40,036 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_let_else.rs:clippy_lints::manual_let_else::expr_simple_identity_map (54x) . return; . }; . 368 ( 0.00%) emit_manual_let_else(cx, stmt.span, match_expr, &ident_map, pat_arm.pat, diverging_arm.body); 64,526 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_let_else.rs:clippy_lints::manual_let_else::emit_manual_let_else (46x) . }, . } . } . } . } . . /// Checks if the patterns of the arms are disjointed. Currently, we only support patterns of simple . /// enum variants without nested patterns or bindings. . /// . /// TODO: Support more complex patterns. 148 ( 0.00%) fn is_arms_disjointed(cx: &LateContext<'_>, arm1: &Arm<'_>, arm2: &Arm<'_>) -> bool { 74 ( 0.00%) if arm1.guard.is_some() || arm2.guard.is_some() { . return false; . } . 432 ( 0.00%) is_enum_variant(cx, arm1.pat) && is_enum_variant(cx, arm2.pat) 3,530 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_let_else.rs:clippy_lints::manual_let_else::is_enum_variant (72x) 10 ( 0.00%) } . . /// Returns `true` if the given pattern is a variant of an enum. 144 ( 0.00%) pub fn is_enum_variant(cx: &LateContext<'_>, pat: &Pat<'_>) -> bool { 516 ( 0.00%) let path = match pat.kind { . PatKind::Struct(ref qpath, fields, _) . if fields . .iter() . .all(|field| is_wild(field.pat) || matches!(field.pat.kind, PatKind::Binding(..))) => . { . (qpath, pat.hir_id) . }, 40 ( 0.00%) PatKind::TupleStruct(ref qpath, pats, _) 42 ( 0.00%) if pats . .iter() . .all(|pat| is_wild(pat) || matches!(pat.kind, PatKind::Binding(..))) => . { 80 ( 0.00%) (qpath, pat.hir_id) . }, 30 ( 0.00%) PatKind::Expr(e) if let Some((qpath, id)) = e.opt_qpath() => (qpath, id), . _ => return false, . }; . let res = path.res(cx); 280 ( 0.00%) matches!( 420 ( 0.00%) res, . Res::Def(DefKind::Variant, ..) | Res::Def(DefKind::Ctor(CtorOf::Variant, _), _) . ) 144 ( 0.00%) } . 230 ( 0.00%) fn emit_manual_let_else( . cx: &LateContext<'_>, . span: Span, . expr: &Expr<'_>, . ident_map: &FxHashMap, BindingMode)>, . pat: &Pat<'_>, . else_body: &Expr<'_>, . ) { 368 ( 0.00%) span_lint_and_then( 63,514 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (46x) . cx, . MANUAL_LET_ELSE, . span, . "this could be rewritten as `let...else`", 322 ( 0.00%) |diag| { . // This is far from perfect, for example there needs to be: . // * renamings of the bindings for many `PatKind`s like slices, etc. . // * limitations in the existing replacement algorithms . // * unused binding collision detection with existing ones . // for this to be machine applicable. . let mut app = Applicability::HasPlaceholders; . let (sn_expr, _) = snippet_with_context(cx, expr.span, span.ctxt(), "", &mut app); . let (sn_else, else_is_mac_call) = snippet_with_context(cx, else_body.span, span.ctxt(), "", &mut app); -- line 176 ---------------------------------------- -- line 189 ---------------------------------------- . // https://rust-lang.github.io/rfcs/3137-let-else.html#let-pattern--if--else--else- . format!("let {sn_bl} = ({sn_expr}) else {else_bl};") . } else { . format!("let {sn_bl} = {sn_expr} else {else_bl};") . }; . diag.span_suggestion(span, "consider writing", sugg, app); . }, . ); 92 ( 0.00%) } . . /// Replaces the locals in the pattern . /// . /// For this example: . /// . /// ```ignore . /// let (a, FooBar { b, c }) = if let Bar { Some(a_i), b_i } = ex { (a_i, b_i) } else { return }; . /// ``` -- line 205 ---------------------------------------- -- line 336 ---------------------------------------- . let (sn_pat, _) = snippet_with_context(cx, pat.span, span.ctxt(), "", app); . sn_pat.into_owned() . } . . fn pat_allowed_for_else(cx: &LateContext<'_>, pat: &'_ Pat<'_>, check_types: bool) -> bool { . // Check whether the pattern contains any bindings, as the . // binding might potentially be used in the body. . // TODO: only look for *used* bindings. 66 ( 0.00%) let mut has_bindings = false; 142 ( 0.00%) pat.each_binding_or_first(&mut |_, _, _, _| has_bindings = true); 264 ( 0.00%) if has_bindings { . return false; . } . . // If we shouldn't check the types, exit early. . if !check_types { . return true; . } . . // Check whether any possibly "unknown" patterns are included, . // because users might not know which values some enum has. . // Well-known enums are excepted, as we assume people know them. . // We do a deep check, to be able to disallow Err(En::Foo(_)) . // for usage of the En::Foo variant, as we disallow En::Foo(_), . // but we allow Err(_). . let typeck_results = cx.typeck_results(); 56 ( 0.00%) let mut has_disallowed = false; 224 ( 0.00%) pat.walk_always(|pat| { . // Only do the check if the type is "spelled out" in the pattern 284 ( 0.00%) if !matches!( 366 ( 0.00%) pat.kind, . PatKind::Struct(..) . | PatKind::TupleStruct(..) . | PatKind::Expr(PatExpr { . kind: PatExprKind::Path(..), . .. . },) . ) { . return; . } 162 ( 0.00%) let ty = typeck_results.pat_ty(pat); 2,160 ( 0.00%) => ???:::pat_ty (54x) . // Option and Result are allowed, everything else isn't. 178 ( 0.00%) if !matches!(ty.opt_diag_name(cx), Some(sym::Option | sym::Result)) { . has_disallowed = true; . } . }); . !has_disallowed . } . . /// Checks if the passed block is a simple identity referring to bindings created by the pattern, . /// and if yes, returns a mapping between the relevant sub-pattern and the identifier it corresponds -- line 386 ---------------------------------------- -- line 398 ---------------------------------------- . /// local_pat: (foo_o, bar_o) . /// let_pat: (Some(foo), bar) . /// expr: (foo, bar) . /// ``` . /// . /// We build internal `sub_pats` so that it looks like `[foo_o, bar_o]` and `paths` so that it looks . /// like `[foo, bar]`. Then we turn that into `FxHashMap [(foo) -> (foo_o), (bar) -> (bar_o)]` which . /// we return. 440 ( 0.00%) fn expr_simple_identity_map<'a, 'hir>( . local_pat: &'a Pat<'hir>, . let_pat: &'_ Pat<'hir>, . expr: &'_ Expr<'hir>, . ) -> Option, BindingMode)>> { . let peeled = peel_blocks(expr); 777 ( 0.00%) let (sub_pats, paths) = match (local_pat.kind, peeled.kind) { . (PatKind::Tuple(pats, _), ExprKind::Tup(exprs)) | (PatKind::Slice(pats, ..), ExprKind::Array(exprs)) => { . (pats, exprs) . }, . (_, ExprKind::Path(_)) => (slice::from_ref(local_pat), slice::from_ref(peeled)), . _ => return None, . }; . . // There is some length mismatch, which indicates usage of .. in the patterns above e.g.: . // let (a, ..) = if let [a, b, _c] = ex { (a, b) } else { ... }; . // We bail in these cases as they should be rare. 2 ( 0.00%) if paths.len() != sub_pats.len() { . return None; . } . . let mut pat_bindings = FxHashMap::default(); 46 ( 0.00%) let_pat.each_binding_or_first(&mut |binding_mode, _hir_id, _sp, ident| { . pat_bindings.insert(ident, binding_mode); . }); 92 ( 0.00%) if pat_bindings.len() < paths.len() { . // This rebinds some bindings from the outer scope, or it repeats some copy-able bindings multiple . // times. We don't support these cases so we bail here. E.g.: . // let foo = 0; . // let (new_foo, bar, bar_copied) = if let Some(bar) = Some(0) { (foo, bar, bar) } else { .. }; . return None; . } . let mut ident_map = FxHashMap::default(); . for (sub_pat, path) in sub_pats.iter().zip(paths.iter()) { 235 ( 0.00%) if let ExprKind::Path(QPath::Resolved(_ty, path)) = path.kind 141 ( 0.00%) && let [path_seg] = path.segments 188 ( 0.00%) && let ident = path_seg.ident 94 ( 0.00%) && let Some(let_binding_mode) = pat_bindings.remove(&ident) . { 141 ( 0.00%) ident_map.insert(ident.name, (sub_pat, let_binding_mode)); . } else { . return None; . } . } 184 ( 0.00%) Some(ident_map) 495 ( 0.00%) } 14,177 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/eq_op.rs -------------------------------------------------------------------------------- Ir -- line 2 ---------------------------------------- . use clippy_utils::diagnostics::{span_lint, span_lint_and_then}; . use clippy_utils::macros::{find_assert_eq_args, first_node_macro_backtrace}; . use clippy_utils::{eq_expr_value, is_in_test_function, sym}; . use rustc_hir::{BinOpKind, Expr}; . use rustc_lint::LateContext; . . use super::EQ_OP; . 559,314 ( 0.02%) pub(crate) fn check_assert<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 62,356 ( 0.00%) if let Some(macro_call) = first_node_macro_backtrace(cx, e).find(|macro_call| { 6,007 ( 0.00%) matches!( 4,048 ( 0.00%) cx.tcx.get_diagnostic_name(macro_call.def_id), 85,466 ( 0.00%) => ???:::get_diagnostic_name (1,012x) . Some(sym::assert_eq_macro | sym::assert_ne_macro | sym::debug_assert_eq_macro | sym::debug_assert_ne_macro) . ) 420 ( 0.00%) }) && let Some((lhs, rhs, _)) = find_assert_eq_args(cx, e, macro_call.expn) 107,910 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::find_assert_eq_args (42x) 294 ( 0.00%) && eq_expr_value(cx, macro_call.span.ctxt(), lhs, rhs) 41,742 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_expr_value (42x) . && macro_call.is_local() . && !is_in_test_function(cx.tcx, e.hir_id) . { . span_lint( . cx, . EQ_OP, . lhs.span.to(rhs.span), . format!( . "identical args used in this `{}!` macro call", . cx.tcx.item_name(macro_call.def_id) . ), . ); . } 497,168 ( 0.01%) } . 13,635 ( 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) 6,972 ( 0.00%) && eq_expr_value(cx, e.span.ctxt(), left, right) 905,561 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_expr_value (996x) . && !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"); . } . }, . ); . } 12,120 ( 0.00%) } 190,632 ( 0.01%) -------------------------------------------------------------------------------- -- 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<'_> { 72 ( 0.00%) fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { 48 ( 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. 150 ( 0.00%) pub fn hir_opt(cx: &LateContext<'_>, expr: &hir::Expr<'_>) -> Option { 15 ( 0.00%) let ctxt = expr.span.ctxt(); 15 ( 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)) 135 ( 0.00%) } . . /// Convenience function around `hir_opt` for suggestions with a default . /// text. 16 ( 0.00%) pub fn hir(cx: &LateContext<'_>, expr: &hir::Expr<'_>, default: &'a str) -> Self { 12 ( 0.00%) Self::hir_opt(cx, expr).unwrap_or(Sugg::NonParen(Cow::Borrowed(default))) 2,852 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/sugg.rs:::hir_opt (2x) 12 ( 0.00%) } . . /// 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` 130 ( 0.00%) pub fn hir_with_applicability( . cx: &LateContext<'_>, . expr: &hir::Expr<'_>, . default: &'a str, . applicability: &mut Applicability, . ) -> Self { 39 ( 0.00%) if *applicability != Applicability::Unspecified && expr.span.from_expansion() { . *applicability = Applicability::MaybeIncorrect; . } 13 ( 0.00%) Self::hir_opt(cx, expr).unwrap_or_else(|| { 18,418 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/sugg.rs:::hir_opt (13x) . if *applicability == Applicability::MachineApplicable { . *applicability = Applicability::HasPlaceholders; . } . Sugg::NonParen(Cow::Borrowed(default)) . }) 104 ( 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![]`. 48 ( 0.00%) pub fn hir_with_context( . cx: &LateContext<'_>, . expr: &hir::Expr<'_>, . ctxt: SyntaxContext, . default: &'a str, . applicability: &mut Applicability, . ) -> Self { 8 ( 0.00%) if expr.span.ctxt() == ctxt { 12 ( 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 { 28 ( 0.00%) Self::hir_from_snippet(cx, expr, |span| { 8 ( 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) . } 36 ( 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 { 129 ( 0.00%) if let Some(range) = higher::Range::hir(cx, expr) { 183 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (4x) . 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); . } . 91 ( 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 80 ( 0.00%) ) => Sugg::NonParen(get_snippet(expr.span)), . ExprKind::DropTemps(inner) => Self::hir_from_snippet(cx, inner, get_snippet), . ExprKind::Assign(lhs, rhs, _) => { . Sugg::BinOp(AssocOp::Assign, get_snippet(lhs.span), get_snippet(rhs.span)) . }, . ExprKind::AssignOp(op, lhs, rhs) => { . Sugg::BinOp(AssocOp::AssignOp(op.node), get_snippet(lhs.span), get_snippet(rhs.span)) . }, . ExprKind::Binary(op, lhs, rhs) => Sugg::BinOp( -- line 185 ---------------------------------------- -- line 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] 144 ( 0.00%) pub fn maybe_paren(self) -> Self { 176 ( 0.00%) match self { 144 ( 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()) . } . }, . Sugg::BinOp(op, lhs, rhs) => { . let sugg = binop_to_string(op, &lhs, &rhs); . Sugg::NonParen(format!("({sugg})").into()) . }, . Sugg::UnOp(op, inner) => Sugg::NonParen(format!("({}{})", op.as_str(), inner.maybe_inner_paren()).into()), . } 144 ( 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] . pub fn strip_paren(self) -> Self { . match self { . Sugg::NonParen(s) | Sugg::MaybeParen(s) => Sugg::NonParen(strip_enclosing_paren(s)), . sugg => sugg, . } . } . 16 ( 0.00%) pub fn into_string(self) -> String { 17 ( 0.00%) match self { 3 ( 0.00%) Sugg::NonParen(p) | Sugg::MaybeParen(p) => p.into_owned(), 12 ( 0.00%) Sugg::BinOp(b, l, r) => binop_to_string(b, &l, &r), 1,305 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/sugg.rs:clippy_utils::sugg::binop_to_string (1x) . Sugg::UnOp(op, inner) => format!("{}{}", op.as_str(), inner.maybe_inner_paren()), . } 16 ( 0.00%) } . . /// Checks if `self` starts with a unary operator. . fn starts_with_unary_op(&self) -> bool { . match self { . Sugg::UnOp(..) => true, . Sugg::BinOp(..) => false, . Sugg::MaybeParen(s) | Sugg::NonParen(s) => s.starts_with(['*', '!', '-', '&']), . } -- line 408 ---------------------------------------- -- line 415 ---------------------------------------- . self . } else { . self.maybe_paren() . } . } . } . . /// Generates a string from the operator and both sides. 6 ( 0.00%) fn binop_to_string(op: AssocOp, lhs: &str, rhs: &str) -> String { 5 ( 0.00%) match op { 2 ( 0.00%) AssocOp::Binary(op) => format!("{lhs} {} {rhs}", op.as_str()), . AssocOp::Assign => format!("{lhs} = {rhs}"), . AssocOp::AssignOp(op) => format!("{lhs} {} {rhs}", op.as_str()), . AssocOp::Cast => format!("{lhs} as {rhs}"), . AssocOp::Range(limits) => format!("{lhs}{}{rhs}", limits.as_str()), . } 2 ( 0.00%) } . . /// Returns `true` if `sugg` is enclosed in parenthesis. 6,060 ( 0.00%) pub fn has_enclosing_paren(sugg: impl AsRef) -> bool { 1,515 ( 0.00%) let mut chars = sugg.as_ref().chars(); 37,875 ( 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 (1,515x) 2,860 ( 0.00%) if chars.next() == Some('(') { . let mut depth = 1; . for c in &mut chars { 20,038 ( 0.00%) if c == '(' { 146 ( 0.00%) depth += 1; 324 ( 0.00%) } else if c == ')' { 324 ( 0.00%) depth -= 1; . } 10,092 ( 0.00%) if depth == 0 { . break; . } . } . chars.next().is_none() . } else { . false . } 7,579 ( 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 ---------------------------------------- -- line 555 ---------------------------------------- . paren: bool, . /// The main thing to display. . wrapped: T, . } . . impl ParenHelper { . /// Builds a `ParenHelper`. . fn new(paren: bool, wrapped: T) -> Self { 4 ( 0.00%) Self { paren, wrapped } . } . } . . impl Display for ParenHelper { . fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { 4 ( 0.00%) if self.paren { . write!(f, "({})", self.wrapped) . } else { . self.wrapped.fmt(f) . } . } . } . . /// Builds the string for `` adding parenthesis when necessary. -- line 577 ---------------------------------------- -- line 584 ---------------------------------------- . Sugg::MaybeParen(format!("{op}{}", expr.maybe_inner_paren()).into()) . } . . /// Builds the string for ` ` adding parenthesis when necessary. . /// . /// Precedence of shift operator relative to other arithmetic operation is . /// often confusing so . /// parenthesis will always be added for a mix of these. 11 ( 0.00%) pub fn make_assoc(op: AssocOp, lhs: &Sugg<'_>, rhs: &Sugg<'_>) -> Sugg<'static> { . /// Returns `true` if the operator is a shift operator `<<` or `>>`. . fn is_shift(op: AssocOp) -> bool { . matches!(op, AssocOp::Binary(ast::BinOpKind::Shl | ast::BinOpKind::Shr)) . } . . /// Returns `true` if the operator is an arithmetic operator . /// (i.e., `+`, `-`, `*`, `/`, `%`). . fn is_arith(op: AssocOp) -> bool { -- line 600 ---------------------------------------- -- line 616 ---------------------------------------- . other.precedence() < op.precedence() . || (other.precedence() == op.precedence() . && ((op != other && associativity(op) != dir) . || (op == other && associativity(op) != Associativity::Both))) . || is_shift(op) && is_arith(other) . || is_shift(other) && is_arith(op) . } . 4 ( 0.00%) let lhs_paren = if let Sugg::BinOp(lop, _, _) = *lhs { . needs_paren(op, lop, Associativity::Left) . } else { . false . }; . 4 ( 0.00%) let rhs_paren = if let Sugg::BinOp(rop, _, _) = *rhs { . needs_paren(op, rop, Associativity::Right) . } else { . false . }; . . let lhs = ParenHelper::new(lhs_paren, lhs).to_string(); . let rhs = ParenHelper::new(rhs_paren, rhs).to_string(); 7 ( 0.00%) Sugg::BinOp(op, lhs.into(), rhs.into()) 9 ( 0.00%) } . . /// Convenience wrapper around `make_assoc` and `AssocOp::Binary`. 3 ( 0.00%) pub fn make_binop(op: ast::BinOpKind, lhs: &Sugg<'_>, rhs: &Sugg<'_>) -> Sugg<'static> { 2 ( 0.00%) make_assoc(AssocOp::Binary(op), lhs, rhs) 508 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/sugg.rs:clippy_utils::sugg::make_assoc (1x) . } . . #[derive(PartialEq, Eq, Clone, Copy)] . /// Operator associativity. . enum Associativity { . /// The operator is both left-associative and right-associative. . Both, . /// The operator is left-associative. -- line 651 ---------------------------------------- -- line 673 ---------------------------------------- . Binary(Add | BitAnd | BitOr | BitXor | And | Or | Mul) | Cast => Associativity::Both, . Binary(Div | Eq | Gt | Ge | Lt | Le | Rem | Ne | Shl | Shr | Sub) => Associativity::Left, . Range(_) => Associativity::None, . } . } . . /// Returns the indentation before `span` if there are nothing but `[ \t]` . /// before it on its line. 49 ( 0.00%) fn indentation(cx: &T, span: Span) -> Option { 21 ( 0.00%) let lo = cx.sess().source_map().lookup_char_pos(span.lo()); 5,285 ( 0.00%) => ???:::lookup_char_pos (7x) . lo.file 28 ( 0.00%) .get_line(lo.line - 1 /* line numbers in `Loc` are 1-based */) 1,120 ( 0.00%) => ???:::get_line (7x) . .and_then(|line| { . if let Some((pos, _)) = line.char_indices().find(|&(_, c)| c != ' ' && c != '\t') { . // We can mix char and byte positions here because we only consider `[ \t]`. 7 ( 0.00%) if lo.col == CharPos(pos) { 21 ( 0.00%) Some(line[..pos].into()) . } else { . None . } . } else { . None . } . }) 56 ( 0.00%) } . . /// Convenience extension trait for `Diag`. . pub trait DiagExt { . /// Suggests to add an attribute to an item. . /// . /// Correctly handles indentation of the attribute and item. . /// . /// # Example -- line 705 ---------------------------------------- -- line 756 ---------------------------------------- . if let Some(indent) = indentation(cx, item) { . let span = item.with_hi(item.lo()); . . self.span_suggestion(span, msg.to_string(), format!("{attr}\n{indent}"), applicability); . } . } . . fn suggest_append_item(&mut self, cx: &T, item: Span, msg: &str, new_item: &str, applicability: Applicability) { 84 ( 0.00%) if let Some(indent) = indentation(cx, item) { 7,133 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/sugg.rs:clippy_utils::sugg::indentation:: (7x) . let span = item.shrink_to_hi(); . let mut new_item_code = String::new(); 70 ( 0.00%) for l in new_item.lines() { 280 ( 0.00%) writeln!(new_item_code, "{indent}{l}").unwrap(); . } . self.span_suggestion( . span, . msg.to_string(), 28 ( 0.00%) format!("\n\n{}", new_item_code.strip_suffix('\n').unwrap()), . applicability, . ); . } . } . . fn suggest_remove_item(&mut self, cx: &T, item: Span, msg: &str, applicability: Applicability) { . let mut remove_span = item; . let fmpos = cx.sess().source_map().lookup_byte_offset(remove_span.hi()); -- line 781 ---------------------------------------- 5,741 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/identity_op.rs -------------------------------------------------------------------------------- Ir -- line 6 ---------------------------------------- . use rustc_hir::def::{DefKind, Res}; . use rustc_hir::{BinOpKind, Expr, ExprKind, Node, Path, QPath}; . use rustc_lint::LateContext; . use rustc_middle::ty; . use rustc_span::{Span, SyntaxContext, kw}; . . use super::IDENTITY_OP; . 18,180 ( 0.00%) pub(crate) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . op: BinOpKind, . left: &'tcx Expr<'_>, . right: &'tcx Expr<'_>, . ) { 26 ( 0.00%) if !is_allowed(cx, expr, op, left, right) { . return; . } . . // 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) = { 2,310 ( 0.00%) let expr = peel_hir_expr_refs(left).0; 5,775 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_refs (1,155x) 1,155 ( 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) = { 1,155 ( 0.00%) let expr = peel_hir_expr_refs(right).0; 5,775 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_refs (1,155x) 1,155 ( 0.00%) let span = expr.span; . let is_coerced = expr_is_erased_ref(cx, expr); . (span, is_coerced) . }; . 4,620 ( 0.00%) let ctxt = expr.span.ctxt(); 4,356 ( 0.00%) match op { . BinOpKind::Add | BinOpKind::BitOr | BinOpKind::BitXor => { 2,058 ( 0.00%) if is_redundant_op(cx, left, 0, ctxt) { 105,835 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/identity_op.rs:clippy_lints::operators::identity_op::is_redundant_op (294x) . let paren = needs_parenthesis(cx, expr, right); . span_ineffective_operation(cx, expr.span, peeled_right_span, paren, right_is_coerced_to_value); . } else if is_redundant_op(cx, right, 0, ctxt) { . let paren = needs_parenthesis(cx, expr, left); . span_ineffective_operation(cx, expr.span, peeled_left_span, paren, left_is_coerced_to_value); . } . }, . BinOpKind::Shl | BinOpKind::Shr | BinOpKind::Sub if is_redundant_op(cx, right, 0, ctxt) => { . let paren = needs_parenthesis(cx, expr, left); . span_ineffective_operation(cx, expr.span, peeled_left_span, paren, left_is_coerced_to_value); . }, . BinOpKind::Mul => { 833 ( 0.00%) if is_redundant_op(cx, left, 1, ctxt) { 35,247 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/identity_op.rs:clippy_lints::operators::identity_op::is_redundant_op (119x) . let paren = needs_parenthesis(cx, expr, right); . span_ineffective_operation(cx, expr.span, peeled_right_span, paren, right_is_coerced_to_value); . } else if is_redundant_op(cx, right, 1, ctxt) { . let paren = needs_parenthesis(cx, expr, left); . span_ineffective_operation(cx, expr.span, peeled_left_span, paren, left_is_coerced_to_value); . } . }, . BinOpKind::Div if is_redundant_op(cx, right, 1, ctxt) => { . let paren = needs_parenthesis(cx, expr, left); . span_ineffective_operation(cx, expr.span, peeled_left_span, paren, left_is_coerced_to_value); . }, . BinOpKind::BitAnd => { 280 ( 0.00%) if is_redundant_op(cx, left, -1, ctxt) { 13,895 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/identity_op.rs:clippy_lints::operators::identity_op::is_redundant_op (40x) . let paren = needs_parenthesis(cx, expr, right); . span_ineffective_operation(cx, expr.span, peeled_right_span, paren, right_is_coerced_to_value); 120 ( 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); . } . }, 26 ( 0.00%) BinOpKind::Rem => check_remainder(cx, left, right, expr.span, left.span), . _ => (), . } 12,120 ( 0.00%) } . . fn expr_is_erased_ref(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 12,705 ( 0.00%) match cx.typeck_results().expr_ty(expr).kind() { 92,536 ( 0.00%) => ???:::expr_ty (2,310x) . ty::Ref(r, ..) => r.is_erased(), . _ => false, . } . } . . #[derive(Copy, Clone)] . enum Parens { . Needed, -- line 95 ---------------------------------------- -- line 106 ---------------------------------------- . /// to `if b { 1 } else { 2 } + if b { 3 } else { 4 }` where the `if` could be . /// interpreted as a statement. The same behavior happens for `match`, `loop`, . /// and blocks. . /// e.g. `2 * (0 + { a })` can be reduced to `2 * { a }` without the need for parenthesis, . /// but `1 * ({ a } + 4)` cannot be reduced to `{ a } + 4`, as a block at the start of a line . /// will be interpreted as a statement instead of an expression. . /// . /// See #8724, #13470 16 ( 0.00%) fn needs_parenthesis(cx: &LateContext<'_>, binary: &Expr<'_>, child: &Expr<'_>) -> Parens { 13 ( 0.00%) match child.kind { 1 ( 0.00%) ExprKind::Binary(_, lhs, _) | ExprKind::Cast(lhs, _) => { . // For casts and binary expressions, we want to add parenthesis if . // the parent HIR node is an expression, or if the parent HIR node . // is a Block or Stmt, and the new left hand side would need . // parenthesis be treated as a statement rather than an expression. 1 ( 0.00%) if let Some((_, parent)) = cx.tcx.hir_parent_iter(binary.hir_id).next() { 2 ( 0.00%) match parent { . Node::Expr(_) => return Parens::Needed, . Node::Block(_) | Node::Stmt(_) => { . // ensure we're checking against the leftmost expression of `child` . // . // ~~~~~~~~~~~ `binary` . // ~~~ `lhs` . // 0 + {4} * 2 . // ~~~~~~~ `child` -- line 130 ---------------------------------------- -- line 156 ---------------------------------------- . }; . } . }, . _ => { . return Parens::Unneeded; . }, . } . Parens::Needed 16 ( 0.00%) } . . fn is_allowed<'tcx>( . cx: &LateContext<'tcx>, . 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. 16,665 ( 0.00%) if (is_assoc_fn_without_type_instance(cx, left) || is_assoc_fn_without_type_instance(cx, right)) 67,778 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/identity_op.rs:clippy_lints::operators::identity_op::is_assoc_fn_without_type_instance (3,030x) . && !is_expr_used_with_type_annotation(cx, expr) . { . return false; . } . . // This lint applies to integers and their references 4,545 ( 0.00%) cx.typeck_results().expr_ty(left).peel_refs().is_integral() 60,640 ( 0.00%) => ???:::expr_ty (1,515x) 3,477 ( 0.00%) && cx.typeck_results().expr_ty(right).peel_refs().is_integral() 46,472 ( 0.00%) => ???:::expr_ty (1,159x) . // `1 << 0` is a common pattern in bit manipulation code 1,159 ( 0.00%) && !(cmp == BinOpKind::Shl 391 ( 0.00%) && is_zero_integer_const(cx, right, expr.span.ctxt()) 20 ( 0.00%) && integer_const(cx, left, expr.span.ctxt()) == Some(1)) 1,152 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:clippy_utils::consts::integer_const (5x) . } . . fn check_remainder(cx: &LateContext<'_>, left: &Expr<'_>, right: &Expr<'_>, span: Span, arg: Span) { 52 ( 0.00%) let ecx = ConstEvalCtxt::new(cx); 1,456 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (26x) . let ctxt = span.ctxt(); 390 ( 0.00%) if match (ecx.eval_full_int(left, ctxt), ecx.eval_full_int(right, ctxt)) { 14,911 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_full_int (52x) . (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); . } . } . 13,296 ( 0.00%) fn is_redundant_op(cx: &LateContext<'_>, e: &Expr<'_>, m: i8, ctxt: SyntaxContext) -> bool { 9,364 ( 0.00%) if let Some(Constant::Int(v)) = ConstEvalCtxt::new(cx).eval_local(e, ctxt).map(Constant::peel_refs) { 318,893 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local (1,108x) 62,048 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (1,108x) 804 ( 0.00%) let check = match *cx.typeck_results().expr_ty(e).peel_refs().kind() { 10,760 ( 0.00%) => ???:::expr_ty (268x) 235 ( 0.00%) ty::Int(ity) => unsext(cx.tcx, -1_i128, ity), 940 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::clip (47x) 1,326 ( 0.00%) ty::Uint(uty) => clip(cx.tcx, !0, uty), 6,444 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::clip (221x) . _ => return false, . }; 1,051 ( 0.00%) if match m { 186 ( 0.00%) 0 => v == 0, 51 ( 0.00%) -1 => v == check, 130 ( 0.00%) 1 => v == 1, . _ => unreachable!(), . } { . return true; . } . } . false 8,864 ( 0.00%) } . 22 ( 0.00%) fn span_ineffective_operation( . cx: &LateContext<'_>, . span: Span, . arg: Span, . parens: Parens, . is_ref_coerced_to_val: bool, . ) { 2 ( 0.00%) let mut applicability = Applicability::MachineApplicable; . let expr_snippet = snippet_with_applicability(cx, arg, "..", &mut applicability); 4 ( 0.00%) let expr_snippet = if is_ref_coerced_to_val { . format!("*{expr_snippet}") . } else { 6 ( 0.00%) expr_snippet.into_owned() . }; 5 ( 0.00%) let suggestion = match parens { 3 ( 0.00%) Parens::Needed => format!("({expr_snippet})"), 5 ( 0.00%) Parens::Unneeded => expr_snippet, . }; . 30 ( 0.00%) span_lint_and_sugg( 499,220 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_sugg:: (2x) . cx, . IDENTITY_OP, . span, . "this operation has no effect", . "consider reducing it to", . suggestion, . applicability, . ); 24 ( 0.00%) } . . fn is_expr_used_with_type_annotation<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> bool { . match get_expr_use_site(cx.tcx, cx.typeck_results(), expr.span.ctxt(), expr).use_node(cx) { . ExprUseNode::LetStmt(letstmt) => letstmt.ty.is_some(), . ExprUseNode::Return(_) => true, . _ => false, . } . } -- line 258 ---------------------------------------- -- line 268 ---------------------------------------- . /// 0 . /// } . /// } . /// fn test() { . /// let _ = 0usize + &Default::default(); . /// let _ = 0usize + &Def::def(); . /// } . /// ``` 18,180 ( 0.00%) fn is_assoc_fn_without_type_instance<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) -> bool { 12,229 ( 0.00%) if let ExprKind::Call(func, _) = peel_hir_expr_refs(expr).0.kind 15,166 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_hir_expr_refs (3,030x) 827 ( 0.00%) && let ExprKind::Path(QPath::Resolved( . // If it's not None, don't need to go further. . None, . Path { . res: Res::Def(DefKind::AssocFn, def_id), . .. . }, 166 ( 0.00%) )) = func.kind . && let output_ty = cx . .tcx . .fn_sig(*def_id) . .instantiate_identity() . .skip_norm_wip() . .skip_binder() . .output() . && let ty::Param(ty::ParamTy { . name: kw::SelfUpper, .. . }) = output_ty.kind() . { . return true; . } . false 18,180 ( 0.00%) } 15,143 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/matches/try_err.rs -------------------------------------------------------------------------------- Ir -- line 7 ---------------------------------------- . use rustc_hir::LangItem::ResultErr; . use rustc_hir::{Expr, ExprKind, LangItem, MatchSource}; . use rustc_lint::LateContext; . use rustc_middle::ty::{self, Ty}; . use rustc_span::{hygiene, sym}; . . use super::TRY_ERR; . 5,072 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>, scrutinee: &'tcx Expr<'_>) { . // Looks for a structure like this: . // match ::std::ops::Try::into_result(Err(5)) { . // ::std::result::Result::Err(err) => . // #[allow(unreachable_code)] . // return ::std::ops::Try::from_error(::std::convert::From::from(err)), . // ::std::result::Result::Ok(val) => . // #[allow(unreachable_code)] . // val, . // }; 3,170 ( 0.00%) if let ExprKind::Call(match_fun, [try_arg]) = scrutinee.kind 4,438 ( 0.00%) && let ExprKind::Path(match_fun_path) = match_fun.kind 4,438 ( 0.00%) && cx.tcx.qpath_is_lang_item(match_fun_path, LangItem::TryTraitBranch) 81,786 ( 0.00%) => ???:::qpath_is_lang_item (634x) 1,697 ( 0.00%) && let ExprKind::Call(err_fun, [err_arg]) = try_arg.kind 45 ( 0.00%) && err_fun.res(cx).ctor_parent(cx).is_lang_item(cx, ResultErr) . && let Some(return_ty) = find_return_type(cx, &expr.kind) . { . let (prefix, suffix, err_ty) = if let Some(ty) = result_error_type(cx, return_ty) { . ("Err(", ")", ty) . } else if let Some(ty) = poll_result_error_type(cx, return_ty) { . ("Poll::Ready(Err(", "))", ty) . } else if let Some(ty) = poll_option_result_error_type(cx, return_ty) { . ("Poll::Ready(Some(Err(", ")))", ty) -- line 37 ---------------------------------------- -- line 58 ---------------------------------------- . format!("{ret_prefix}{prefix}{origin_snippet}{suffix}") . } else { . format!("{ret_prefix}{prefix}{origin_snippet}.into(){suffix}") . }; . diag.span_suggestion(expr.span, "try", suggestion, applicability); . }, . ); . } 5,072 ( 0.00%) } . . /// Finds function return type by examining return expressions in match arms. . fn find_return_type<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx ExprKind<'_>) -> Option> { . if let ExprKind::Match(_, arms, MatchSource::TryDesugar(_)) = expr { . for arm in *arms { . if let ExprKind::Ret(Some(ret)) = arm.body.kind { . return Some(cx.typeck_results().expr_ty(ret)); . } -- line 74 ---------------------------------------- 1,313 ( 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 { 310,730 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 186,438 ( 0.01%) if cx.tcx.sess.edition() >= Edition::Edition2024 { . return; . } . 310,984 ( 0.01%) let (scrutinee, keyword_fallback) = match expr.kind { 4,116 ( 0.00%) ExprKind::Match(scrutinee, _, _) => (scrutinee, "`match`"), 254 ( 0.00%) ExprKind::Let(let_expr) => (let_expr.init, "`if let` / `while let`"), . _ => return, . }; . 3,850 ( 0.00%) if scrutinee.span.from_expansion() || expr.span.from_expansion() { . return; . } . 836 ( 0.00%) if let ExprKind::Block(block, _) = scrutinee.kind 4 ( 0.00%) && matches!(block.rules, BlockCheckMode::DefaultBlock) 2 ( 0.00%) && block.stmts.is_empty() . && let Some(inner_expr) = block.expr . { . let inner_snippet = snippet(cx, inner_expr.span, ".."); . . let main_msg = "this scrutinee is wrapped in a block"; . . span_lint_and_then(cx, BLOCK_SCRUTINEE, scrutinee.span, main_msg, |diag| { . let mut keyword = keyword_fallback; -- line 60 ---------------------------------------- -- line 102 ---------------------------------------- . vec![ . (outer_span.shrink_to_lo(), format!("let res = {inner_snippet};\n{pad}")), . (scrutinee.span, "res".to_string()), . ], . Applicability::MaybeIncorrect, . ); . }); . } 310,730 ( 0.01%) } . } 1,880 ( 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; 726,368 ( 0.02%) &__RUST_STD_INTERNAL_VAL . } . } . }) . } . }}, . . // used to generate the `LocalKey` value for `thread_local!` . (@key $t:ty, $(#[$align_attr:meta])*, $init:expr) => {{ -- line 83 ---------------------------------------- -- line 97 ---------------------------------------- . __RUST_STD_INTERNAL_VAL.get_or_init(__rust_std_internal_init, __rust_std_internal_init_fn) . } . } else { . |__rust_std_internal_init| { . #[thread_local] . $(#[$align_attr])* . static __RUST_STD_INTERNAL_VAL: $crate::thread::local_impl::LazyStorage<$t, !> . = $crate::thread::local_impl::LazyStorage::new(); 54 ( 0.00%) __RUST_STD_INTERNAL_VAL.get_or_init(__rust_std_internal_init, __rust_std_internal_init_fn) . } . } . }) . } . }}, . } . . #[rustc_macro_transparency = "semiopaque"] -- line 113 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/manual_hash_one.rs -------------------------------------------------------------------------------- Ir -- line 55 ---------------------------------------- . . impl ManualHashOne { . pub fn new(conf: &'static Conf) -> Self { . Self { msrv: conf.msrv.into() } . } . } . . impl LateLintPass<'_> for ManualHashOne { 16,528 ( 0.00%) fn check_local(&mut self, cx: &LateContext<'_>, local: &LetStmt<'_>) { . // `let mut hasher = seg.build_hasher();` 14,658 ( 0.00%) if let PatKind::Binding(BindingMode::MUT, hasher, _, None) = local.pat.kind 849 ( 0.00%) && let Some(init) = local.init 560 ( 0.00%) && !init.span.from_expansion() 693 ( 0.00%) && let ExprKind::MethodCall(seg, build_hasher, [], _) = init.kind 55 ( 0.00%) && seg.ident.name == sym::build_hasher . . && let Node::Stmt(local_stmt) = cx.tcx.parent_hir_node(local.hir_id) . && let Node::Block(block) = cx.tcx.parent_hir_node(local_stmt.hir_id) . . && let mut stmts = block.stmts.iter() . .skip_while(|stmt| stmt.hir_id != local_stmt.hir_id) . .skip(1) . .filter(|&stmt| is_local_used(cx, stmt, hasher)) -- line 77 ---------------------------------------- -- line 121 ---------------------------------------- . ), . ], . Applicability::MachineApplicable, . ); . } . }, . ); . } 16,528 ( 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 147 ---------------------------------------- . . fn is_public_macro(cx: &LateContext<'_>, def_id: LocalDefId) -> bool { . (cx.effective_visibilities.is_exported(def_id) || find_attr!(cx.tcx, def_id, MacroExport { .. })) . && !cx.tcx.is_doc_hidden(def_id) . } . . impl<'tcx> Visitor<'tcx> for BodyVisitor<'_, 'tcx> { . fn visit_stmt(&mut self, s: &'tcx Stmt<'tcx>) { 10,132 ( 0.00%) let from_expn = s.span.from_expansion(); . if from_expn { 972 ( 0.00%) self.expn_depth += 1; . } . walk_stmt(self, s); . if from_expn { 1,107 ( 0.00%) self.expn_depth -= 1; . } . } . 452,648 ( 0.01%) fn visit_expr(&mut self, e: &'tcx Expr<'tcx>) { 56,581 ( 0.00%) let ctxt = e.span.ctxt(); . 113,162 ( 0.00%) if let ExprKind::Block(block, _) = e.kind 7,260 ( 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() . && (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(); 191,540 ( 0.01%) } else if ctxt.is_root() && self.expn_depth > 0 { . let unsafe_block = self.macro_unsafe_blocks.last().copied(); . 1,156 ( 0.00%) match (self.lint.metavar_expns.entry(e.span), unsafe_block) { 2,640 ( 0.00%) (Entry::Vacant(e), None) => { 528 ( 0.00%) e.insert(MetavarState::ReferencedInSafe); . }, . (Entry::Vacant(e), Some(unsafe_block)) => { . e.insert(MetavarState::ReferencedInUnsafe { . unsafe_blocks: vec![unsafe_block], . }); . }, . (Entry::Occupied(mut e), None) => { 150 ( 0.00%) if let MetavarState::ReferencedInUnsafe { .. } = *e.get() { . e.insert(MetavarState::ReferencedInSafe); . } . }, . (Entry::Occupied(mut e), Some(unsafe_block)) => { . if let MetavarState::ReferencedInUnsafe { unsafe_blocks } = e.get_mut() . && !unsafe_blocks.contains(&unsafe_block) . { . unsafe_blocks.push(unsafe_block); . } . }, . } . . // NB: No need to visit descendant nodes. They're guaranteed to represent the same . // metavariable . } else { 168,009 ( 0.00%) walk_expr(self, e); 6,328,944 ( 0.17%) => /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,954x) . } 452,648 ( 0.01%) } . } . . impl<'tcx> LateLintPass<'tcx> for ExprMetavarsInUnsafe { 26,586 ( 0.00%) fn check_body(&mut self, cx: &LateContext<'tcx>, body: &rustc_hir::Body<'tcx>) { 23,632 ( 0.00%) if is_lint_allowed(cx, MACRO_METAVARS_IN_UNSAFE, body.value.hir_id) { 3,712,225 ( 0.10%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (2,954x) . 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 . 17,724 ( 0.00%) let mut vis = BodyVisitor { . macro_unsafe_blocks: Vec::new(), . #[expect(clippy::bool_to_int_with_if)] // obfuscates the meaning 5,908 ( 0.00%) expn_depth: if body.value.span.from_expansion() { 1 } else { 0 }, . cx, . lint: self . }; . vis.visit_body(body); 20,678 ( 0.00%) } . . fn check_crate_post(&mut self, cx: &LateContext<'tcx>) { . // Aggregate all unsafe blocks from all spans: . // ``` . // macro_rules! x { . // ($w:expr, $x:expr, $y:expr) => { $w; unsafe { $w; $x; }; unsafe { $x; $y; }; } . // } . // $w: [] (unsafe#0 is never added because it was referenced in a safe context) . // $x: [unsafe#0, unsafe#1] . // $y: [unsafe#1] . // ``` . // We want to lint unsafe blocks #0 and #1 . let bad_unsafe_blocks = self . .metavar_expns . .values() 528 ( 0.00%) .filter_map(|state| match state { . MetavarState::ReferencedInUnsafe { unsafe_blocks } => Some(unsafe_blocks.as_slice()), . MetavarState::ReferencedInSafe => None, . }) . .flatten() . .copied() . .inspect(|&unsafe_block| { . let level_spec = cx.tcx.lint_level_spec_at_node(MACRO_METAVARS_IN_UNSAFE, unsafe_block); . if level_spec.is_expect() { -- line 255 ---------------------------------------- -- line 266 ---------------------------------------- . // The invocation doesn't matter. Also we want to dedupe by the unsafe block and not by anything . // related to the callsite. . let span = cx.tcx.hir_span(id); . . (id, Span::new(span.lo(), span.hi(), SyntaxContext::root(), None)) . }) . .dedup_by(|&(_, a), &(_, b)| a == b); . 20 ( 0.00%) for (id, span) in bad_unsafe_blocks { 21,282 ( 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%) } . } 236,145 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_lint_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)] 835 ( 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: 47,385 ( 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 { 22 ( 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: 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<'_>) { 5,144 ( 0.00%) check_item(cx, item.hir_id()); 393,594 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:clippy_lints::utils::author::check_item (2,572x) . } . . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'_>) { 5,006 ( 0.00%) check_item(cx, item.hir_id()); 837,869 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:clippy_lints::utils::author::check_item (2,503x) . } . . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) { 140 ( 0.00%) check_item(cx, item.hir_id()); 17,646 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/utils/author.rs:clippy_lints::utils::author::check_item (70x) . } . 26,793 ( 0.00%) fn check_arm(&mut self, cx: &LateContext<'tcx>, arm: &'tcx hir::Arm<'_>) { 5,954 ( 0.00%) check_node(cx, arm.hir_id, |v| { . v.arm(&v.bind("arm", arm)); . }); 23,816 ( 0.00%) } . 559,314 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 124,292 ( 0.00%) check_node(cx, expr.hir_id, |v| { . v.expr(&v.bind("expr", expr)); . }); 497,168 ( 0.01%) } . 51,480 ( 0.00%) fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx hir::Stmt<'_>) { 32,182 ( 0.00%) match stmt.kind { 14,348 ( 0.00%) StmtKind::Expr(e) | StmtKind::Semi(e) if has_attr(cx, e.hir_id) => return, . _ => {}, . } 11,440 ( 0.00%) check_node(cx, stmt.hir_id, |v| { . v.stmt(&v.bind("stmt", stmt)); . }); 45,760 ( 0.00%) } . } . 46,305 ( 0.00%) fn check_item(cx: &LateContext<'_>, hir_id: HirId) { 25,725 ( 0.00%) if let Some(body) = cx.tcx.hir_maybe_body_owned_by(hir_id.expect_owner().def_id) { 753,944 ( 0.02%) => ???:::hir_maybe_body_owned_by (5,145x) . check_node_with_body( . cx, . hir_id, 2,609 ( 0.00%) |v| { . v.expr(&v.bind("expr", body.value)); . }, . Some(body), . ); . } 41,160 ( 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<'_>>, . ) { 70,731 ( 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 { 94,173 ( 0.00%) let attrs = cx.tcx.hir_attrs(hir_id); 246,460 ( 0.01%) => ???:::hir_attrs (2,977x) 12,534 ( 0.00%) get_builtin_attr(attrs, sym::author).count() > 0 . } -------------------------------------------------------------------------------- -- 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 127,658 ( 0.00%) if let ExprKind::If(cond, then, None) = expr.kind 63 ( 0.00%) && let Some((c, op_node, l)) = get_const(cx, cond) 315 ( 0.00%) && let BinOpKind::Ne | BinOpKind::Lt = op_node 85 ( 0.00%) && let ExprKind::Block(block, None) = then.kind 49 ( 0.00%) && let Block { . stmts: 85 ( 0.00%) [ . Stmt { 16 ( 0.00%) kind: StmtKind::Expr(ex) | StmtKind::Semi(ex), . .. . }, . ], . expr: None, . .. . } . | Block { . stmts: [], . expr: Some(ex), . .. 49 ( 0.00%) } = block 48 ( 0.00%) && let ExprKind::AssignOp(op1, target, value) = ex.kind . && let ty = cx.typeck_results().expr_ty(target) . && Some(c) == get_int_max(ty) . && let ctxt = expr.span.ctxt() . && ex.span.ctxt() == ctxt . && cond.span.ctxt() == ctxt . && clippy_utils::SpanlessEq::new(cx).eq_expr(ctxt, l, target) . && AssignOpKind::AddAssign == op1.node . && let ExprKind::Lit(lit) = value.kind -- line 72 ---------------------------------------- -- line 88 ---------------------------------------- . IMPLICIT_SATURATING_ADD, . expr.span, . "manual saturating add detected", . "use instead", . sugg, . app, . ); . } 497,168 ( 0.01%) } . } . . fn get_int_max(ty: Ty<'_>) -> Option { . use rustc_middle::ty::{Int, Uint}; . match ty.peel_refs().kind() { . Int(IntTy::I8) => i8::MAX.try_into().ok(), . Int(IntTy::I16) => i16::MAX.try_into().ok(), . Int(IntTy::I32) => i32::MAX.try_into().ok(), -- line 104 ---------------------------------------- -- line 111 ---------------------------------------- . Uint(UintTy::U64) => Some(u64::MAX.into()), . Uint(UintTy::U128) => Some(u128::MAX), . Uint(UintTy::Usize) => usize::MAX.try_into().ok(), . _ => None, . } . } . . fn get_const<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) -> Option<(u128, BinOpKind, &'tcx Expr<'tcx>)> { 2,731 ( 0.00%) if let ExprKind::Binary(op, l, r) = expr.kind { 317 ( 0.00%) let ecx = ConstEvalCtxt::new(cx); 17,752 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (317x) 317 ( 0.00%) let ctxt = expr.span.ctxt(); 2,154 ( 0.00%) if let Some(Constant::Int(c)) = ecx.eval_local(r, ctxt) { 124,482 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local (317x) . return Some((c, op.node, l)); . } 1,270 ( 0.00%) if let Some(Constant::Int(c)) = ecx.eval_local(l, ctxt) { 34,168 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local (254x) . return Some((c, invert_op(op.node)?, r)); . } . } . None . } . . fn invert_op(op: BinOpKind) -> Option { . use rustc_hir::BinOpKind::{Ge, Gt, Le, Lt, Ne}; -- line 133 ---------------------------------------- 2,995 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/too_many_lines.rs -------------------------------------------------------------------------------- Ir -- line 13 ---------------------------------------- . kind: FnKind<'_>, . body: &hir::Body<'_>, . span: Span, . def_id: LocalDefId, . too_many_lines_threshold: u64, . ) { . // Closures must be contained in a parent body, which will be checked for `too_many_lines`. . // Don't check closures for `too_many_lines` to avoid duplicated lints. 6,746 ( 0.00%) if matches!(kind, FnKind::Closure) || (span.from_expansion() && span.in_external_macro(cx.sess().source_map())) { . return; . } . 4,092 ( 0.00%) let mut line_count: u64 = 0; 2,046 ( 0.00%) let too_many = body.value.span.check_text(cx, |src| { . let mut in_comment = false; . let mut code_in_line; . 6,138 ( 0.00%) let function_lines = if matches!(body.value.kind, hir::ExprKind::Block(..)) 2,046 ( 0.00%) && src.as_bytes().first().copied() == Some(b'{') 2,046 ( 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(); 17,857 ( 0.00%) if line.is_empty() { . break; . } 35,140 ( 0.00%) if in_comment { 74 ( 0.00%) if let Some(i) = line.find("*/") { . line = &line[i + 2..]; . in_comment = false; . continue; . } . } else { . let multi_idx = line.find("/*").unwrap_or(line.len()); . let single_idx = line.find("//").unwrap_or(line.len()); 105,198 ( 0.00%) code_in_line |= multi_idx > 0 && single_idx > 0; . // Implies multi_idx is below line.len() 35,066 ( 0.00%) if multi_idx < single_idx { . line = &line[multi_idx + 2..]; . in_comment = true; . continue; . } . } . break; . } 35,140 ( 0.00%) if code_in_line { 56,784 ( 0.00%) line_count += 1; . } . } 8,184 ( 0.00%) line_count > too_many_lines_threshold . }); . . if too_many { . span_lint( . cx, . TOO_MANY_LINES, . cx.tcx.def_span(def_id), 36 ( 0.00%) format!("this function has too many lines ({line_count}/{too_many_lines_threshold})"), . ); . } . } 190,357 ( 0.01%) -------------------------------------------------------------------------------- -- 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 { 28,292 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 22,642 ( 0.00%) if !cx.effective_visibilities.is_exported(item.owner_id.def_id) || !self.msrv.meets(cx, msrvs::NON_EXHAUSTIVE) { 137,019 ( 0.00%) => ???:::is_exported (2,572x) 20,871 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (773x) . return; . } . 3,847 ( 0.00%) match item.kind { 36 ( 0.00%) ItemKind::Enum(_, _, def) if def.variants.len() > 1 => { . let iter = def.variants.iter().filter_map(|v| { 210 ( 0.00%) (matches!(v.data, VariantData::Unit(_, _)) && is_doc_hidden(cx.tcx.hir_attrs(v.hir_id))) 3,431 ( 0.00%) => ???:::hir_attrs (29x) . .then_some((v.def_id, v.span)) . }); 27 ( 0.00%) if let Ok((id, span)) = iter.exactly_one() 4,810 ( 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 (9x) . && !find_attr!(cx.tcx, item.hir_id(), NonExhaustive(..)) . { . self.potential_enums.push((item.owner_id.def_id, id, item.span, span)); . } . }, 104 ( 0.00%) ItemKind::Struct(_, _, variant_data) => { . let fields = variant_data.fields(); . let private_fields = fields . .iter() 387 ( 0.00%) .filter(|field| !cx.effective_visibilities.is_exported(field.def_id)); 5,613 ( 0.00%) => ???:::is_exported (129x) 208 ( 0.00%) if fields.len() > 1 . && let Ok(field) = private_fields.exactly_one() . && let TyKind::Tup([]) = field.ty.kind . { . span_lint_and_then( . cx, . MANUAL_NON_EXHAUSTIVE, . item.span, . "this seems like a manual implementation of the non-exhaustive pattern", -- line 113 ---------------------------------------- -- line 142 ---------------------------------------- . // ``` . diag.span_help(field.span, "remove this field"); . }, . ); . } . }, . _ => {}, . } 20,576 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 216,092 ( 0.01%) if let ExprKind::Path(QPath::Resolved(None, p)) = &e.kind 83,147 ( 0.00%) && let Res::Def(DefKind::Ctor(CtorOf::Variant, CtorKind::Const), ctor_id) = p.res . && let Some(local_ctor) = ctor_id.as_local() . { 780 ( 0.00%) let variant_id = cx.tcx.local_parent(local_ctor); 11,960 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::local_parent:: (260x) . 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%) } . } 192 ( 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; . 301,770 ( 0.01%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 105 ( 0.00%) if let Some(higher::WhileLet { if_then, let_pat, let_expr, label, .. }) = higher::WhileLet::hir(expr) . // check for `Some(..)` pattern 63 ( 0.00%) && let Some(some_pat) = as_some_pattern(cx, let_pat) 4,473 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::as_some_pattern (21x) . // check for call to `Iterator::next` 93 ( 0.00%) && let ExprKind::MethodCall(method_name, iter_expr, [], _) = let_expr.kind 17 ( 0.00%) && method_name.ident.name == sym::next 24 ( 0.00%) && cx.ty_based_def(let_expr).opt_parent(cx).is_diag_item(cx, sym::Iterator) 33 ( 0.00%) && let Some(iter_expr_struct) = try_parse_iter_expr(cx, iter_expr) 801 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/while_let_on_iterator.rs:clippy_lints::loops::while_let_on_iterator::try_parse_iter_expr (3x) . // get the loop containing the match expression 6 ( 0.00%) && !uses_iter(cx, &iter_expr_struct, if_then) . { 3 ( 0.00%) let mut applicability = Applicability::MachineApplicable; . 3 ( 0.00%) let loop_label = label.map_or(String::new(), |l| format!("{}: ", l.ident.name)); 42 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:>::map_or:: (3x) . . let loop_var = if let Some(some_pat) = some_pat.first() { 15 ( 0.00%) if is_refutable(cx, some_pat) { 361 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_refutable (3x) . // Refutable patterns don't work with for loops. . return; . } 3 ( 0.00%) snippet_with_applicability(cx, some_pat.span, "..", &mut applicability) . } else { . "_".into() . }; . . // If the iterator is a field or the iterator is accessed after the loop is complete it needs to be . // passed by reference. TODO: If the struct can be partially moved from and the struct isn't used . // afterwards a mutable borrow of a field isn't necessary. 3 ( 0.00%) let iterator = snippet_with_applicability(cx, iter_expr.span, "_", &mut applicability); 9 ( 0.00%) let iterator_by_ref = if cx.typeck_results().expr_ty(iter_expr).ref_mutability() == Some(Mutability::Mut) 120 ( 0.00%) => ???:::expr_ty (3x) . || !iter_expr_struct.can_move 3 ( 0.00%) || !iter_expr_struct.fields.is_empty() . || needs_mutable_borrow(cx, &iter_expr_struct, expr) . { 12 ( 0.00%) make_iterator_snippet(cx, iter_expr, &iterator) 2,196 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/while_let_on_iterator.rs:clippy_lints::loops::while_let_on_iterator::make_iterator_snippet (3x) . } else { . iterator.into_owned() . }; . 42 ( 0.00%) span_lint_and_sugg( 734,140 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_sugg:: (3x) . cx, . WHILE_LET_ON_ITERATOR, 6 ( 0.00%) expr.span.with_hi(let_expr.span.hi()), . "this loop could be written as a `for` loop", . "try", 33 ( 0.00%) format!("{loop_label}for {loop_var} in {iterator_by_ref}"), . applicability, . ); 21 ( 0.00%) } 344,880 ( 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. . can_move: bool, . } . . /// Parses any expression to find out which field of which variable is used. Will return `None` if . /// the expression might have side effects. 21 ( 0.00%) fn try_parse_iter_expr(cx: &LateContext<'_>, mut e: &Expr<'_>) -> Option { . let mut fields = Vec::new(); . let mut can_move = true; . loop { . if cx . .typeck_results() 18 ( 0.00%) .expr_adjustments(e) 258 ( 0.00%) => ???:::expr_adjustments (6x) . .iter() 6 ( 0.00%) .any(|a| matches!(a.kind, Adjust::Deref(DerefAdjustKind::Overloaded(..)))) . { . // Custom deref impls need to borrow the whole value as it's captured by reference . can_move = false; . fields.clear(); . } 42 ( 0.00%) match e.kind { 3 ( 0.00%) ExprKind::Path(ref path) => { 27 ( 0.00%) break Some(IterExpr { 9 ( 0.00%) fields, 15 ( 0.00%) path: cx.qpath_res(path, e.hir_id), 69 ( 0.00%) => ???:::qpath_res (3x) . can_move, . }); . }, 6 ( 0.00%) ExprKind::Field(base, name) => { . fields.push(name.name); . e = base; . }, . // Dereferencing a pointer has no side effects and doesn't affect which field is being used. . ExprKind::Unary(UnOp::Deref, base) if cx.typeck_results().expr_ty(base).is_ref() => e = base, . . // Shouldn't have side effects, but there's no way to trace which field is used. So forget which fields have . // already been seen. -- line 113 ---------------------------------------- -- line 122 ---------------------------------------- . e = base; . }, . . // No effect and doesn't affect which field is being used. . ExprKind::DropTemps(base) | ExprKind::AddrOf(_, _, base) | ExprKind::Type(base, _) => e = base, . _ => break None, . } . } 24 ( 0.00%) } . . fn is_expr_same_field(cx: &LateContext<'_>, mut e: &Expr<'_>, mut fields: &[Symbol], path_res: Res) -> bool { . loop { . match (&e.kind, fields) { . (&ExprKind::Field(base, name), [head_field, tail_fields @ ..]) if name.name == *head_field => { . e = base; . fields = tail_fields; . }, -- line 138 ---------------------------------------- -- line 144 ---------------------------------------- . } . } . } . . /// Checks if the given expression is the same field as, is a child of, or is the parent of the . /// given field. Used to check if the expression can be used while the given field is borrowed . /// mutably. e.g. if checking for `x.y`, then `x.y`, `x.y.z`, and `x` will all return true, but . /// `x.z`, and `y` will return false. 1,356 ( 0.00%) fn is_expr_same_child_or_parent_field(cx: &LateContext<'_>, expr: &Expr<'_>, fields: &[Symbol], path_res: Res) -> bool { 695 ( 0.00%) match expr.kind { 8 ( 0.00%) ExprKind::Field(base, name) => { . if let Some((head_field, tail_fields)) = fields.split_first() { 8 ( 0.00%) if name.name == *head_field && is_expr_same_field(cx, base, tail_fields, path_res) { . return true; . } . // Check if the expression is a parent field . let mut fields_iter = tail_fields.iter(); . while let Some(field) = fields_iter.next() { . if *field == name.name && is_expr_same_field(cx, base, fields_iter.as_slice(), path_res) { . return true; . } . } . } . . // Check if the expression is a child field. . let mut e = base; . loop { 72 ( 0.00%) match e.kind { . ExprKind::Field(..) if is_expr_same_field(cx, e, fields, path_res) => break true, . ExprKind::Field(base, _) | ExprKind::DropTemps(base) | ExprKind::Type(base, _) => e = base, . ExprKind::Path(ref path) if fields.is_empty() => { . break cx.qpath_res(path, e.hir_id) == path_res; . }, . _ => break false, . } . } . }, . // If the path matches, this is either an exact match, or the expression is a parent of the field. 192 ( 0.00%) ExprKind::Path(ref path) => cx.qpath_res(path, expr.hir_id) == path_res, . ExprKind::DropTemps(base) | ExprKind::Type(base, _) | ExprKind::AddrOf(_, _, base) => { . is_expr_same_child_or_parent_field(cx, base, fields, path_res) . }, . _ => false, . } 904 ( 0.00%) } . . /// Strips off all field and path expressions. This will return true if a field or path has been . /// skipped. Used to skip them after failing to check for equality. . fn skip_fields_and_path<'tcx>(expr: &'tcx Expr<'_>) -> (Option<&'tcx Expr<'tcx>>, bool) { . let mut e = expr; . let e = loop { 1,073 ( 0.00%) match e.kind { 8 ( 0.00%) ExprKind::Field(base, _) | ExprKind::DropTemps(base) | ExprKind::Type(base, _) => e = base, . ExprKind::Path(_) => return (None, true), . _ => break e, . } . }; . (Some(e), e.hir_id != expr.hir_id) . } . . /// Checks if the given expression uses the iterator. . fn uses_iter<'tcx>(cx: &LateContext<'tcx>, iter_expr: &IterExpr, container: &'tcx Expr<'_>) -> bool { . struct V<'a, 'b, 'tcx> { . cx: &'a LateContext<'tcx>, . iter_expr: &'b IterExpr, . } . impl<'tcx> Visitor<'tcx> for V<'_, '_, 'tcx> { . type Result = ControlFlow<()>; 1,017 ( 0.00%) fn visit_expr(&mut self, e: &'tcx Expr<'_>) -> Self::Result { 1,243 ( 0.00%) if is_expr_same_child_or_parent_field(self.cx, e, &self.iter_expr.fields, self.iter_expr.path) { 87 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/while_let_on_iterator.rs:clippy_lints::loops::while_let_on_iterator::is_expr_same_child_or_parent_field (3x) . ControlFlow::Break(()) 57 ( 0.00%) } else if let (e, true) = skip_fields_and_path(e) { . if let Some(e) = e { . self.visit_expr(e) . } else { . ControlFlow::Continue(()) . } 114 ( 0.00%) } else if let ExprKind::Closure(&Closure { body: id, .. }) = e.kind { . if is_res_used(self.cx, self.iter_expr.path, id) { . ControlFlow::Break(()) . } else { . ControlFlow::Continue(()) . } . } else { 513 ( 0.00%) walk_expr(self, e) 14,591 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr:: (3x) . } 504 ( 0.00%) } . } . 12 ( 0.00%) let mut v = V { cx, iter_expr }; 6 ( 0.00%) v.visit_expr(container).is_break() 14,840 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/while_let_on_iterator.rs:::visit_expr (3x) . } . . #[expect(clippy::too_many_lines)] . fn needs_mutable_borrow(cx: &LateContext<'_>, iter_expr: &IterExpr, loop_expr: &Expr<'_>) -> bool { . struct AfterLoopVisitor<'a, 'b, 'tcx> { . cx: &'a LateContext<'tcx>, . iter_expr: &'b IterExpr, . loop_id: HirId, -- line 242 ---------------------------------------- -- line 354 ---------------------------------------- . v.visit_expr(cx.tcx.hir_body(cx.enclosing_body.unwrap()).value) . .is_break() . } . } . . /// Constructs the transformed iterator expression for the suggestion. . /// Returns `iterator.by_ref()` unless the last deref adjustment targets an unsized type, . /// in which case it applies all derefs (e.g., `&mut **iterator` or `&mut ***iterator`). 30 ( 0.00%) fn make_iterator_snippet<'tcx>(cx: &LateContext<'tcx>, iter_expr: &Expr<'tcx>, iterator: &str) -> String { . if let Some((n, adjust)) = cx . .typeck_results() 6 ( 0.00%) .expr_adjustments(iter_expr) 129 ( 0.00%) => ???:::expr_adjustments (3x) . .iter() 3 ( 0.00%) .take_while(|x| matches!(x.kind, Adjust::Deref(_))) . .enumerate() . .last() . && !adjust.target.is_sized(cx.tcx, cx.typing_env()) . { . format!("&mut {:* -------------------------------------------------------------------------------- -- 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx rustc_hir::Expr<'tcx>) { 143,328 ( 0.00%) if !expr.span.from_expansion() 18,303 ( 0.00%) && let hir::ExprKind::MethodCall(path, recv, [map_arg], ..) = expr.kind 3,854 ( 0.00%) && !map_arg.span.from_expansion() 7,384 ( 0.00%) && let hir::ExprKind::Path(fun) = map_arg.kind 3,616 ( 0.00%) && let Some(sym::Option | sym::Result) = cx.typeck_results().expr_ty(recv).opt_diag_name(cx) 35,820 ( 0.00%) => ???:::expr_ty (894x) . { 98 ( 0.00%) let (constructor_path, constructor_item) = if let hir::ExprKind::Call(constructor, [arg, ..]) = recv.kind 20 ( 0.00%) && let hir::ExprKind::Path(constructor_path) = constructor.kind 8 ( 0.00%) && !constructor.span.from_expansion() 8 ( 0.00%) && !arg.span.from_expansion() . { . (constructor_path, arg) . } else { . return; . }; 8 ( 0.00%) let constructor_symbol = match constructor_path { . hir::QPath::Resolved(_, path) => { . if let Some(path_segment) = path.segments.last() { . path_segment.ident.name . } else { . return; . } . }, 8 ( 0.00%) hir::QPath::TypeRelative(_, path) => path.ident.name, . }; . match constructor_symbol { 24 ( 0.00%) sym::Some | sym::Ok if path.ident.name == sym::map => (), . sym::Err if path.ident.name == sym::map_err => (), . _ => return, . } . . let mut app = Applicability::MachineApplicable; . let fun_snippet = snippet_with_applicability(cx, fun.span(), "_", &mut app); . let constructor_snippet = snippet_with_applicability(cx, constructor_path.span(), "_", &mut app); . let constructor_arg_snippet = snippet_with_applicability(cx, constructor_item.span, "_", &mut app); -- line 75 ---------------------------------------- -- line 81 ---------------------------------------- . "unnecessary `{}` on constructor `{constructor_snippet}(_)`", . path.ident.name . ), . "try", . format!("{constructor_snippet}({fun_snippet}({constructor_arg_snippet}))"), . app, . ); . } 497,168 ( 0.01%) } . } 86,228 ( 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<'_>) { 62,310 ( 0.00%) if let PatKind::Binding(.., ident, _) = pat.kind 9,144 ( 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), . ); . } 12,867 ( 0.00%) } . } 45,720 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memchr-2.8.2/src/arch/x86_64/memchr.rs -------------------------------------------------------------------------------- Ir -- line 70 ---------------------------------------- . use core::sync::atomic::{AtomicPtr, Ordering}; . . type Fn = *mut (); . type RealFn = $fnty; . static FN: AtomicPtr<()> = AtomicPtr::new(detect as Fn); . . #[cfg(target_feature = "sse2")] . #[target_feature(enable = "sse2", enable = "avx2")] 26,306 ( 0.00%) unsafe fn find_avx2( . $($needle: u8),+, . $hay_start: *const u8, . $hay_end: *const u8, . ) -> $retty { . use crate::arch::x86_64::avx2::memchr::$memchrty; . $memchrty::new_unchecked($($needle),+) . .$memchrfind($hay_start, $hay_end) 52,612 ( 0.00%) } . . #[cfg(target_feature = "sse2")] . #[target_feature(enable = "sse2")] . unsafe fn find_sse2( . $($needle: u8),+, . $hay_start: *const u8, . $hay_end: *const u8, . ) -> $retty { -- line 94 ---------------------------------------- -- line 101 ---------------------------------------- . $($needle: u8),+, . $hay_start: *const u8, . $hay_end: *const u8, . ) -> $retty { . use crate::arch::all::memchr::$memchrty; . $memchrty::new($($needle),+).$memchrfind($hay_start, $hay_end) . } . 3 ( 0.00%) unsafe fn detect( . $($needle: u8),+, . $hay_start: *const u8, . $hay_end: *const u8, . ) -> $retty { . let fun = { . #[cfg(not(target_feature = "sse2"))] . { . debug!( -- line 117 ---------------------------------------- -- line 118 ---------------------------------------- . "no sse2 feature available, using fallback for {}", . stringify!($memchrty), . ); . find_fallback as RealFn . } . #[cfg(target_feature = "sse2")] . { . use crate::arch::x86_64::{sse2, avx2}; 1 ( 0.00%) if avx2::memchr::$memchrty::is_available() { . debug!("chose AVX2 for {}", stringify!($memchrty)); . find_avx2 as RealFn . } else if sse2::memchr::$memchrty::is_available() { . debug!("chose SSE2 for {}", stringify!($memchrty)); . find_sse2 as RealFn . } else { . debug!("chose fallback for {}", stringify!($memchrty)); . find_fallback as RealFn -- line 134 ---------------------------------------- -- line 136 ---------------------------------------- . } . }; . FN.store(fun as Fn, Ordering::Relaxed); . // SAFETY: The only thing we need to uphold here is the . // `#[target_feature]` requirements. Since we check is_available . // above before using the corresponding implementation, we are . // guaranteed to only call code that is supported on the current . // CPU. 5 ( 0.00%) fun($($needle),+, $hay_start, $hay_end) 3,190 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memchr-2.8.2/src/arch/x86_64/memchr.rs:memchr::arch::x86_64::memchr::memchr_raw::find_avx2 (1x) . } . . // SAFETY: By virtue of the caller contract, RealFn is a function . // pointer, which is always safe to transmute with a *mut (). Also, . // since we use $memchrty::is_available, it is guaranteed to be safe . // to call $memchrty::$memchrfind. . unsafe { . let fun = FN.load(Ordering::Relaxed); 105,224 ( 0.00%) core::mem::transmute::(fun)( 1,058,727 ( 0.03%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memchr-2.8.2/src/arch/x86_64/memchr.rs:memchr::arch::x86_64::memchr::memchr_raw::find_avx2 (26,305x) 3,207 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/memchr-2.8.2/src/arch/x86_64/memchr.rs:memchr::arch::x86_64::memchr::memchr_raw::detect (1x) . $($needle),+, . $hay_start, . $hay_end, . ) . } . }}; . } . -- line 161 ---------------------------------------- 11,195 ( 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. 249,378 ( 0.01%) let var = if let ExprKind::Assign(lhs, ..) | ExprKind::AssignOp(_, lhs, _) = expr.kind . && let Some(var) = lhs.res_local_id() 1,125 ( 0.00%) && expr.span.desugaring_kind().is_none() 36,000 ( 0.00%) => ???:::desugaring_kind (375x) . { . var . } else { . return; . }; 1,875 ( 0.00%) let mut visitor = ReadVisitor { . cx, . var, . write_expr: expr, . last_expr: expr, . }; . check_for_unsequenced_reads(&mut visitor); 62,146 ( 0.00%) } . fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { 27,146 ( 0.00%) match stmt.kind { 2,066 ( 0.00%) StmtKind::Let(local) => { 6,198 ( 0.00%) if let LetStmt { init: Some(e), .. } = local { 5,868 ( 0.00%) DivergenceVisitor { cx }.visit_expr(e); 3,096,955 ( 0.09%) => site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::visit_expr (1,956x) . } . }, 17,935 ( 0.00%) StmtKind::Expr(e) | StmtKind::Semi(e) => DivergenceVisitor { cx }.maybe_walk_expr(e), 3,634,417 ( 0.10%) => site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::maybe_walk_expr (3,587x) . StmtKind::Item(..) => {}, . } . } . } . . struct DivergenceVisitor<'a, 'tcx> { . cx: &'a LateContext<'tcx>, . } . . impl<'tcx> DivergenceVisitor<'_, 'tcx> { 153,275 ( 0.00%) fn maybe_walk_expr(&mut self, e: &'tcx Expr<'_>) { 239,266 ( 0.01%) match e.kind { . ExprKind::Closure(..) | ExprKind::If(..) | ExprKind::Loop(..) => {}, 3,141 ( 0.00%) ExprKind::Match(e, arms, _) => { 3,141 ( 0.00%) self.visit_expr(e); 1,228,678 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::visit_expr (439x) 907,010 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::visit_expr'2 (353x) . for arm in arms { 6,144 ( 0.00%) if let Some(if_expr) = arm.guard { 18 ( 0.00%) self.visit_expr(if_expr); 251 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::visit_expr (1x) 1,729 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::visit_expr'2 (8x) . } . // make sure top level arm expressions aren't linted 6,144 ( 0.00%) self.maybe_walk_expr(arm.body); 574,650 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::maybe_walk_expr'2 (1,659x) . } . }, 199,528 ( 0.01%) _ => walk_expr(self, e), 3,481,683 ( 0.10%) => /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:: (3,903x) . } 12,906 ( 0.00%) } . . 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; . } . span_lint(self.cx, DIVERGING_SUB_EXPRESSION, e.span, "sub-expression diverges"); . } . } . . fn stmt_might_diverge(stmt: &Stmt<'_>) -> bool { 116 ( 0.00%) !matches!(stmt.kind, StmtKind::Item(..)) . } . . impl<'tcx> Visitor<'tcx> for DivergenceVisitor<'_, 'tcx> { 175,140 ( 0.00%) fn visit_expr(&mut self, e: &'tcx Expr<'_>) { 173,427 ( 0.00%) match e.kind { . // fix #10776 822 ( 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); 21 ( 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), 3,354 ( 0.00%) ExprKind::Call(func, _) => { 6,708 ( 0.00%) let typ = self.cx.typeck_results().expr_ty(func); 57,120 ( 0.00%) => ???:::expr_ty (1,424x) . if typ.is_fn() { 19,854 ( 0.00%) let sig = typ.fn_sig(self.cx.tcx); 1,073,459 ( 0.03%) => ???:::fn_sig (1,403x) 26,472 ( 0.00%) if self.cx.tcx.instantiate_bound_regions_with_erased(sig).output().kind() == &ty::Never { 389,405 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased::> (1,403x) . self.report_diverging_sub_expr(e); . } . } . }, . ExprKind::MethodCall(..) => { 2,721 ( 0.00%) let borrowed_table = self.cx.typeck_results(); 10,884 ( 0.00%) if borrowed_table.expr_ty(e).is_never() { 33,380 ( 0.00%) => ???:::expr_ty (833x) . self.report_diverging_sub_expr(e); . } . }, . _ => { . // do not lint expressions referencing objects of type `!`, as that required a . // diverging expression . // to begin with . }, . } 75,060 ( 0.00%) self.maybe_walk_expr(e); 2,683,905 ( 0.07%) => site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::maybe_walk_expr (1,956x) 2,044,589 ( 0.06%) => site/frontend/rust-clippy/clippy_lints/src/mixed_read_write_in_expression.rs:::maybe_walk_expr'2 (4,707x) 150,120 ( 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 ---------------------------------------- -- line 207 ---------------------------------------- . /// and `|| x = 1` don't necessarily evaluate `x`), and . /// . /// * which one is evaluated first depends on the order of sub-expression evaluation. Blocks, `if`s, . /// loops, `match`es, and the short-circuiting logical operators are considered to have a defined . /// evaluation order. . /// . /// When such a read is found, the lint is triggered. . fn check_for_unsequenced_reads(vis: &mut ReadVisitor<'_, '_>) { 1,500 ( 0.00%) let mut cur_id = vis.write_expr.hir_id; . loop { 24,669 ( 0.00%) let parent_id = vis.cx.tcx.parent_hir_id(cur_id); 268,372 ( 0.01%) => ???:::parent_hir_id (4,174x) 3,928 ( 0.00%) if parent_id == cur_id { . break; . } . 46,372 ( 0.00%) let stop_early = match vis.cx.tcx.hir_node(parent_id) { 261,252 ( 0.01%) => ???:::hir_node (4,174x) 1,597 ( 0.00%) Node::Expr(expr) => check_expr(vis, expr), 2,253 ( 0.00%) Node::Stmt(stmt) => check_stmt(vis, stmt), . Node::Item(_) => { . // We reached the top of the function, stop. . break; . }, . _ => StopEarly::KeepGoing, . }; . match stop_early { . StopEarly::Stop => break, -- line 232 ---------------------------------------- -- line 289 ---------------------------------------- . } . . vis.last_expr = expr; . . StopEarly::KeepGoing . } . . fn check_stmt<'tcx>(vis: &mut ReadVisitor<'_, 'tcx>, stmt: &'tcx Stmt<'_>) -> StopEarly { 2,259 ( 0.00%) match stmt.kind { . StmtKind::Expr(expr) | StmtKind::Semi(expr) => check_expr(vis, expr), . // If the declaration is of a local variable, check its initializer . // expression if it has one. Otherwise, keep going. . StmtKind::Let(local) => local . .init . .as_ref() . .map_or(StopEarly::KeepGoing, |expr| check_expr(vis, expr)), . StmtKind::Item(..) => StopEarly::KeepGoing, -- line 305 ---------------------------------------- 108,117 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/nonstandard_macro_braces.rs -------------------------------------------------------------------------------- Ir -- line 39 ---------------------------------------- . . pub struct MacroBraces { . macro_braces: (FxHashMap, usize), . /// Spans for statement macro calls, they have special behaviour with semicolons . mac_stmt_spans: Vec, . } . . impl MacroBraces { 560 ( 0.00%) pub fn new(conf: &'static Conf) -> Self { 280 ( 0.00%) Self { . macro_braces: macro_braces(&conf.standard_macro_braces), . mac_stmt_spans: Vec::new(), . } 630 ( 0.00%) } . } . . impl EarlyLintPass for MacroBraces { 10,605 ( 0.00%) fn check_mac(&mut self, cx: &EarlyContext<'_>, mac: &ast::MacCall) { . if let Some(last_segment) = mac.path.segments.last() 1,515 ( 0.00%) && let name = last_segment.ident.as_str() 48,480 ( 0.00%) => ???:::as_str (1,515x) 1,041 ( 0.00%) && let Some(&braces) = self.macro_braces.0.get(name) 4,164 ( 0.00%) && let Some(snip) = snippet_opt(cx.sess(), mac.span().with_lo(last_segment.span().lo())) 53,091 ( 0.00%) => ???:::span (347x) 1,735 ( 0.00%) => ???:::span (347x) 694 ( 0.00%) && let Some(macro_args_str) = &snip.strip_prefix(name).and_then(|snip| snip.strip_prefix('!')) 1,186 ( 0.00%) && let Some(old_open_brace @ ('{' | '(' | '[')) = macro_args_str.trim_start().chars().next() 694 ( 0.00%) && old_open_brace != braces.0 . { . // Semicolons added for statements that previously ended in braces, see issue #9913 . let add_semi = self.mac_stmt_spans.iter().any(|s| *s == mac.span()); . emit_help( . cx, . &snippet_opt(cx.sess(), mac.span()).unwrap(), . braces, . mac.span(), . add_semi, . ); . } 12,120 ( 0.00%) } . . // See issue #9913 . fn check_stmt(&mut self, _: &EarlyContext<'_>, stmt: &ast::Stmt) { 35,439 ( 0.00%) if let ast::StmtKind::MacCall(mac_callstmt) = &stmt.kind 2,062 ( 0.00%) && let ast::MacCallStmt { . style: ast::MacStmtStyle::Braces, . .. 1,031 ( 0.00%) } = **mac_callstmt . { 9 ( 0.00%) self.mac_stmt_spans.push(mac_callstmt.mac.span()); 459 ( 0.00%) => ???:::span (3x) . } 8,985 ( 0.00%) } . . fn check_mac_def(&mut self, cx: &EarlyContext<'_>, mac: &ast::MacroDef) { 4,102 ( 0.00%) fn check_ts(cx: &EarlyContext<'_>, ts: &TokenStream, macro_braces: &FxHashMap) { . for (i, current_token) in ts.iter().enumerate() { 7,582 ( 0.00%) if let TokenTree::Delimited(_, _, _, token_stream) = current_token { . // Peel extra braces and parenthesis in macros! 1,680 ( 0.00%) check_ts(cx, token_stream, macro_braces); 81,557 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/nonstandard_macro_braces.rs:::check_mac_def::check_ts'2 (54x) . } else . // |-TokenKind::Bang . // v . // println! { "Hi" } . // ^^^^^^^ . // | ^^^^^^^^ Brackets always come 1 token after TokenKind::Bang . // ident_token 5,902 ( 0.00%) if let TokenTree::Token( . Token { . kind: TokenKind::Ident(ident_token, _), . span: ident_span, . }, . _, . ) = current_token . && let Some(bang_token) = ts.get(i + 1) 1,225 ( 0.00%) && let Some(macro_args_token) = ts.get(i + 2) 3,878 ( 0.00%) && let TokenTree::Token( . Token { . kind: TokenKind::Bang, .. . }, . _, . ) = *bang_token 52 ( 0.00%) && let TokenTree::Delimited(delim_span, _, delim, _) = macro_args_token . // Span from ident_token to brackets (so, the full macro call) 130 ( 0.00%) && let snip_span = ident_span.with_hi(delim_span.close.hi()) 78 ( 0.00%) && let Some(snip) = snippet_opt(cx, snip_span) 4 ( 0.00%) && let Some(&braces) = macro_braces.get(ident_token.as_str()) 24 ( 0.00%) && let Some(old_open_brace) = match delim { . Delimiter::Brace => Some('{'), . Delimiter::Parenthesis => Some('('), . Delimiter::Bracket => Some('['), . Delimiter::Invisible(_) => None, . } 4 ( 0.00%) && old_open_brace != braces.0 . { . emit_help(cx, &snip, braces, snip_span, false); . } . } 4,688 ( 0.00%) } . 52 ( 0.00%) if mac.macro_rules { 130 ( 0.00%) check_ts(cx, &mac.body.tokens, &self.macro_braces.0); 44,551 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/nonstandard_macro_braces.rs:::check_mac_def::check_ts (15x) . } . } . } . . fn emit_help(cx: &EarlyContext<'_>, snip: &str, (open, close): (char, char), span: Span, add_semi: bool) { . let semi = if add_semi { ";" } else { "" }; . if let Some((macro_name, macro_args_str)) = snip.split_once('!') { . let mut macro_args = macro_args_str.trim().to_string(); -- line 144 ---------------------------------------- -- line 154 ---------------------------------------- . format!("{macro_name}!{open}{macro_args}{close}{semi}"), . Applicability::MachineApplicable, . ); . } . } . . fn macro_braces(conf: &[MacroMatcher]) -> (FxHashMap, usize) { . // TODO: Use `Symbol`s here, instead of strings. 140 ( 0.00%) let mut braces = FxHashMap::from_iter( 130,416 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/collections/hash/map.rs: as core::iter::traits::collect::FromIterator<(alloc::string::String, (char, char))>>::from_iter::<[(alloc::string::String, (char, char)); 13]> (70x) 3,990 ( 0.00%) [ . ("assert_matches", ('(', ')')), . ("cfg_select", ('{', '}')), . ("debug_assert_matches", ('(', ')')), . ("format", ('(', ')')), . ("format_args", ('(', ')')), . ("eprint", ('(', ')')), . ("eprintln", ('(', ')')), . ("print", ('(', ')')), -- line 171 ---------------------------------------- -- line 188 ---------------------------------------- . )] . #[expect(clippy::redundant_closure_for_method_calls, reason = "Clarity")] . let max_len = braces . .keys() . .map(|macro_name| macro_name.len()) . .max() . .expect("`braces` is non-empty"); . 280 ( 0.00%) (braces, max_len) . } 8,149 ( 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, . ) { 20,384 ( 0.00%) if !check_private_items && !cx.effective_visibilities.is_exported(item.owner_id.def_id) { 135,081 ( 0.00%) => ???:::is_exported (2,538x) . return; . } . if first_paragraph_text_len <= 200 1 ( 0.00%) || !matches!( 2 ( 0.00%) 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(..) . | ItemKind::Const(..) . | ItemKind::Fn { .. } . | ItemKind::Macro(..) . | ItemKind::Mod(..) . | ItemKind::TyAlias(..) -- line 33 ---------------------------------------- -------------------------------------------------------------------------------- -- 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%) } . 1,438,320 ( 0.04%) fn check(&mut self, cx: &LateContext<'_>, span: Span, derive_src: Option) { 179,790 ( 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); . } . } . } 1,438,320 ( 0.04%) } . } . . 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 { 144,250 ( 0.00%) self.check(cx, *span, None); 519,300 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (28,850x) . } . } 7 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 310,730 ( 0.01%) self.check(cx, expr.span, None); 1,118,628 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (62,146x) . // `$t + $t` can have the context of $t, check also the span of the binary operator 125,982 ( 0.00%) if let ExprKind::Binary(op, ..) = expr.kind { 6,760 ( 0.00%) self.check(cx, op.span, None); 30,420 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (1,690x) . } . } . . fn check_stmt(&mut self, cx: &LateContext<'_>, stmt: &Stmt<'_>) { 22,880 ( 0.00%) self.check(cx, stmt.span, None); 102,960 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (5,720x) . } . . fn check_ty(&mut self, cx: &LateContext<'_>, ty: &Ty<'_, AmbigArg>) { 71,488 ( 0.00%) self.check(cx, ty.span, None); 321,696 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (17,872x) . } . . fn check_pat(&mut self, cx: &LateContext<'_>, pat: &Pat<'_>) { 51,468 ( 0.00%) self.check(cx, pat.span, None); 231,606 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (12,867x) . } . 25,720 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 10,288 ( 0.00%) self.check(cx, item.span, self.derive_src); 46,296 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (2,572x) 12,860 ( 0.00%) self.check(cx, item.vis_span, None); 46,296 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (2,572x) . 7,716 ( 0.00%) if matches!( 2,572 ( 0.00%) item.kind, . ItemKind::Struct(..) | ItemKind::Enum(..) | ItemKind::Union(..) 14 ( 0.00%) ) && macro_backtrace(item.span).all(|m| !matches!(m.kind, MacroKind::Derive)) . { 520 ( 0.00%) self.derive_src = Some(item.owner_id); . } 20,576 ( 0.00%) } . . fn check_foreign_item(&mut self, cx: &LateContext<'_>, item: &ForeignItem<'_>) { . self.check(cx, item.span, None); . self.check(cx, item.vis_span, None); . } . . fn check_impl_item(&mut self, cx: &LateContext<'_>, item: &ImplItem<'_>) { 12,515 ( 0.00%) self.check(cx, item.span, None); 45,054 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (2,503x) 6,575 ( 0.00%) if let ImplItemImplKind::Inherent { vis_span, .. } = item.impl_kind { 6,276 ( 0.00%) self.check(cx, vis_span, None); 28,242 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (1,569x) . } . } . . fn check_trait_item(&mut self, cx: &LateContext<'_>, item: &TraitItem<'_>) { 280 ( 0.00%) self.check(cx, item.span, None); 1,260 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (70x) . } . . fn check_path(&mut self, cx: &LateContext<'_>, path: &Path<'_>, _: HirId) { 165,436 ( 0.00%) self.check(cx, path.span, None); 744,462 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/disallowed_macros.rs:::check (41,359x) . } . } 780 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/option_option.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use clippy_utils::source::snippet; . use rustc_hir::def_id::DefId; . use rustc_hir::{self as hir, QPath}; . use rustc_lint::LateContext; . use rustc_span::symbol::sym; . . use super::OPTION_OPTION; . 31,776 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_>, def_id: DefId) -> bool { 18,536 ( 0.00%) if cx.tcx.is_diagnostic_item(sym::Option, def_id) 172,687 ( 0.00%) => ???:::is_diagnostic_item (2,648x) 546 ( 0.00%) && let Some(arg) = qpath_generic_tys(qpath).next() 5,187 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::qpath_generic_tys (273x) 15 ( 0.00%) && arg.basic_res().opt_def_id() == Some(def_id) . { 180 ( 0.00%) span_lint_and_then( 16,848 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (15x) . cx, . OPTION_OPTION, 15 ( 0.00%) hir_ty.span, . // use just `T` here, as the inner type is not what's problematic . "use of `Option>`", . |diag| { . // but use the specific type here, as: . // - this is kind of a suggestion . // - it's printed right after the linted type . let inner_opt = snippet(cx, arg.span, "_"); . diag.help(format!( -- line 28 ---------------------------------------- -- line 29 ---------------------------------------- . "consider using `{inner_opt}`, or a custom enum if you need to distinguish all 3 cases" . )); . }, . ); . true . } else { . false . } 18,536 ( 0.00%) } 2,906 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/span_encoding.rs -------------------------------------------------------------------------------- Ir -- line 72 ---------------------------------------- . /// the form of the code. No crates in `rustc-perf` need more than 15 bits . /// for `ctxt_or_parent_or_marker`, but larger crates might need more than 16 . /// bits. The number of bits needed for `parent` hasn't been measured, . /// because `parent` isn't currently used by default. . /// . /// In order to reliably use parented spans in incremental compilation, . /// accesses to `lo` and `hi` must introduce a dependency to the parent definition's span. . /// This is performed using the callback `SPAN_TRACK` to access the query engine. 110,616 ( 0.00%) #[derive(Clone, Copy, Eq, PartialEq, Hash)] . #[rustc_pass_by_value] . pub struct Span { 1,551 ( 0.00%) lo_or_index: u32, 1,384 ( 0.00%) len_with_tag_or_marker: u16, 692 ( 0.00%) ctxt_or_parent_or_marker: u16, . } . . // Convenience structures for all span formats. . #[derive(Clone, Copy)] . struct InlineCtxt { . lo: u32, . len: u16, . ctxt: u16, -- line 93 ---------------------------------------- -- line 109 ---------------------------------------- . #[derive(Clone, Copy)] . struct Interned { . index: u32, . } . . impl InlineCtxt { . #[inline] . fn data(self) -> SpanData { 33,528 ( 0.00%) let len = self.len as u32; . debug_assert!(len <= MAX_LEN); 34,718 ( 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 { 33,826 ( 0.00%) let len = (self.len_with_tag & !PARENT_TAG) as u32; . debug_assert!(len <= MAX_LEN); 89,418 ( 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) = 2,901 ( 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 { 19,672 ( 0.00%) SpanData { . ctxt: SyntaxContext::from_u16(self.ctxt), 9,570 ( 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, . ) => { 7,457,144 ( 0.21%) if $span.len_with_tag_or_marker != BASE_LEN_INTERNED_MARKER { 9,936,100 ( 0.27%) 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 . } 2,367,544 ( 0.07%) } else if $span.ctxt_or_parent_or_marker != CTXT_INTERNED_MARKER { . // Partially-interned format. . let $span3 = PartiallyInterned::from_span($span); . $arm3 . } else { . // Interned format. . let $span4 = Interned::from_span($span); . $arm4 . } -- line 230 ---------------------------------------- -- line 240 ---------------------------------------- . const CTXT_INTERNED_MARKER: u16 = 0b1111_1111_1111_1111; . . /// The dummy span has zero position, length, and context, and no parent. . pub const DUMMY_SP: Span = . Span { lo_or_index: 0, len_with_tag_or_marker: 0, ctxt_or_parent_or_marker: 0 }; . . impl Span { . #[inline] 1,572 ( 0.00%) pub fn new( . mut lo: BytePos, . mut hi: BytePos, . ctxt: SyntaxContext, . parent: Option, . ) -> Self { 8,101 ( 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). 1,275 ( 0.00%) let (len, ctxt32) = (hi.0 - lo.0, ctxt.as_u32()); 30,627 ( 0.00%) if len <= MAX_LEN && ctxt32 <= MAX_CTXT { 15,574 ( 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(); 35,393 ( 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| { 5,990 ( 0.00%) with_span_interner(|interner| interner.intern(&SpanData { lo, hi, ctxt, parent })) 54,650 ( 0.00%) => ???:::intern (599x) . }; 2 ( 0.00%) if ctxt32 <= MAX_CTXT { . // Interned ctxt should never be read, so it can use any value. 1,198 ( 0.00%) PartiallyInterned::span(index(SyntaxContext::from_u32(u32::MAX)), ctxt32 as u16) . } else { . Interned::span(index(ctxt)) . } 43,295 ( 0.00%) } . . #[inline] 7,714 ( 0.00%) pub fn data(self) -> SpanData { . let data = self.data_untracked(); 55,409 ( 0.00%) if let Some(parent) = data.parent { 45,464 ( 0.00%) (*SPAN_TRACK)(parent); 2,940 ( 0.00%) => ???:rustc_interface::callbacks::track_span_parent (140x) . } . data 1,120 ( 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] 216 ( 0.00%) pub fn data_untracked(self) -> SpanData { . match_span_kind! { . self, . InlineCtxt(span) => span.data(), . InlineParent(span) => span.data(), 7,624 ( 0.00%) PartiallyInterned(span) => span.data(), . Interned(span) => span.data(), . } 54 ( 0.00%) } . . /// Returns `true` if this span comes from any kind of macro, desugaring or inlining. . #[inline] . pub fn from_expansion(self) -> bool { . let ctxt = match_span_kind! { . self, . // All branches here, except `InlineParent`, actually return `span.ctxt_or_parent_or_marker`. . // Since `Interned` is selected if the field contains `CTXT_INTERNED_MARKER` returning that value -- line 312 ---------------------------------------- -- line 321 ---------------------------------------- . Interned(_span) => SyntaxContext::from_u16(CTXT_INTERNED_MARKER), . }; . !ctxt.is_root() . } . . /// Returns `true` if this is a dummy span with any hygienic context. . #[inline] . pub fn is_dummy(self) -> bool { 112 ( 0.00%) if self.len_with_tag_or_marker != BASE_LEN_INTERNED_MARKER { . // Inline-context or inline-parent format. . let lo = self.lo_or_index; . let len = (self.len_with_tag_or_marker & !PARENT_TAG) as u32; . debug_assert!(len <= MAX_LEN); 168 ( 0.00%) lo == 0 && len == 0 . } else { . // Fully-interned or partially-interned format. . let index = self.lo_or_index; . let data = with_span_interner(|interner| interner.spans[index as usize]); . data.lo == BytePos(0) && data.hi == BytePos(0) . } . } . -- line 342 ---------------------------------------- -- line 344 ---------------------------------------- . pub fn map_ctxt(self, map: impl FnOnce(SyntaxContext) -> SyntaxContext) -> Span { . let data = match_span_kind! { . self, . InlineCtxt(span) => { . // This format occurs 1-2 orders of magnitude more often than others (#125017), . // so it makes sense to micro-optimize it to avoid `span.data()` and `Span::new()`. . let new_ctxt = map(SyntaxContext::from_u16(span.ctxt)); . let new_ctxt32 = new_ctxt.as_u32(); 236 ( 0.00%) return if new_ctxt32 <= MAX_CTXT { . // Any small new context including zero will preserve the format. 118 ( 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)) 354 ( 0.00%) } . . // Returns either syntactic context, if it can be retrieved without taking the interner lock, . // or an index into the interner if it cannot. . #[inline] . fn inline_ctxt(self) -> Result { . match_span_kind! { . self, . InlineCtxt(span) => Ok(SyntaxContext::from_u16(span.ctxt)), -- line 373 ---------------------------------------- -- line 382 ---------------------------------------- . #[cfg_attr(not(test), rustc_diagnostic_item = "SpanCtxt")] . #[inline] . pub fn ctxt(self) -> SyntaxContext { . self.inline_ctxt() . .unwrap_or_else(|index| with_span_interner(|interner| interner.spans[index].ctxt)) . } . . #[inline] 12 ( 0.00%) pub fn eq_ctxt(self, other: Span) -> bool { 27,030 ( 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 . }), . } 3 ( 0.00%) } . . #[inline] . pub fn with_parent(self, parent: Option) -> Span { . let data = match_span_kind! { . self, . InlineCtxt(span) => { . // This format occurs 1-2 orders of magnitude more often than others (#126544), . // so it makes sense to micro-optimize it to avoid `span.data()` and `Span::new()`. -- line 409 ---------------------------------------- -- line 415 ---------------------------------------- . if span.ctxt == 0 && parent32 <= MAX_CTXT { . return InlineParent::span(span.lo, span.len, parent32 as u16); . } . } . } . span.data() . }, . InlineParent(span) => span.data(), 1,946 ( 0.00%) PartiallyInterned(span) => span.data(), . Interned(span) => span.data(), . }; . 1,946 ( 0.00%) if let Some(old_parent) = data.parent { 1,261 ( 0.00%) (*SPAN_TRACK)(old_parent); 14,385 ( 0.00%) => ???:rustc_interface::callbacks::track_span_parent (685x) . } . data.with_parent(parent) . } . . #[inline] . pub fn parent(self) -> Option { . let interned_parent = 12 ( 0.00%) |index: u32| with_span_interner(|interner| interner.spans[index as usize].parent); . match_span_kind! { . self, . InlineCtxt(_span) => None, . InlineParent(span) => Some(LocalDefId { local_def_index: DefIndex::from_u16(span.parent) }), 12 ( 0.00%) PartiallyInterned(span) => interned_parent(span.index), . Interned(span) => interned_parent(span.index), . } . } . . #[inline] . pub(crate) fn to_raw_span(self) -> RawSpan { . // Field order must match `from_raw_span`. . RawSpan(self.lo_or_index, self.len_with_tag_or_marker, self.ctxt_or_parent_or_marker) -- line 449 ---------------------------------------- -- 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 { 4,792 ( 0.00%) crate::with_session_globals(|session_globals| f(&mut session_globals.span_interner.lock())) . } 3,724,119 ( 0.10%) -------------------------------------------------------------------------------- -- 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"; . 19,299 ( 0.00%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>, func: &Expr<'_>, args: &'tcx [Expr<'_>]) { 12,744 ( 0.00%) if let ExprKind::Path(QPath::Resolved(_, func_path)) = func.kind . && let Some(func_def_id) = func_path.res.opt_def_id() 17,622 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::mem_swap, func_def_id) 136,681 ( 0.00%) => ???:::is_diagnostic_item (1,602x) . { 187 ( 0.00%) match (ArgKind::new(cx, &args[0]), ArgKind::new(cx, &args[1])) { 2,322 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/swap_with_temporary.rs:::new (22x) . (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), . _ => {}, . } . } 22,056 ( 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>), . // Any other case . Expr(&'tcx Expr<'tcx>), . } . . impl<'tcx> ArgKind<'tcx> { . /// Build a new `ArgKind` from `arg`. There must be no false positive when returning a . /// `ArgKind::RefMutToTemp` variant, as this may cause a spurious lint to be emitted. 154 ( 0.00%) fn new(cx: &LateContext<'tcx>, arg: &'tcx Expr<'tcx>) -> Self { 80 ( 0.00%) if let ExprKind::AddrOf(BorrowKind::Ref, _, target) = arg.kind 54 ( 0.00%) && let adjustments = cx.typeck_results().expr_adjustments(arg) 786 ( 0.00%) => ???:::expr_adjustments (18x) 18 ( 0.00%) && adjustments . .first() 72 ( 0.00%) .is_some_and(|adj| matches!(adj.kind, Adjust::Deref(DerefAdjustKind::Builtin))) 18 ( 0.00%) && adjustments . .last() 36 ( 0.00%) .is_some_and(|adj| matches!(adj.kind, Adjust::Borrow(_))) . { . let extra_derefs = adjustments[1..adjustments.len() - 1] . .iter() . .filter(|adj| matches!(adj.kind, Adjust::Deref(_))) . .count(); . // If a deref is used, `arg` might be a place expression. For example, a mutex guard . // would dereference into the mutex content which is probably not temporary. 72 ( 0.00%) if target.is_syntactic_place_expr() || extra_derefs > 0 { 258 ( 0.00%) => ???:::is_syntactic_place_expr (18x) 36 ( 0.00%) if arg.span.from_expansion() { . ArgKind::RefMutToPlaceAsMacro(arg, extra_derefs) . } else { 72 ( 0.00%) ArgKind::RefMutToPlace(target, extra_derefs) . } . } else { . ArgKind::RefMutToTemp(target) . } . } else { 8 ( 0.00%) ArgKind::Expr(arg) . } 132 ( 0.00%) } . } . . // Emits a note either on the temporary expression if it can be found in the same context as the . // base and returns `true`, or on the mutable reference to the temporary expression otherwise and . // returns `false`. . fn emit_note(diag: &mut Diag<'_, ()>, base: &Expr<'_>, expr: &Expr<'_>, expr_temp: &Expr<'_>) -> bool { . if base.span.eq_ctxt(expr.span) { . diag.span_note(expr_temp.span.source_callsite(), MSG_TEMPORARY); -- line 81 ---------------------------------------- 152 ( 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) => { 618 ( 0.00%) v.insert(attr.span); 614 ( 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"); . }); . }, . } . } . 24,321 ( 0.00%) fn check_duplicated_attr( . cx: &EarlyContext<'_>, . attr: &MetaItem, . attr_paths: &mut FxHashMap, . parent: &mut Vec, . ) { 4,422 ( 0.00%) if attr.span.from_expansion() { . return; . } 4,145 ( 0.00%) let attr_path = if let Some(ident) = attr.ident() { 5,553 ( 0.00%) => ???:::ident (617x) 1,656 ( 0.00%) ident.name . } else { 3 ( 0.00%) Symbol::intern(&path_to_string(&attr.path)) 1,447 ( 0.00%) => ???:rustc_ast_pretty::pprust::path_to_string (1x) . }; 7,457 ( 0.00%) if let Some(ident) = attr.ident() { 5,553 ( 0.00%) => ???:::ident (617x) . 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; . } . } 8 ( 0.00%) if let Some(value) = attr.value_str() { . emit_if_duplicated( . cx, . attr, . attr_paths, 60 ( 0.00%) format!("{}:{attr_path}={value}", parent.iter().join(":")), 1,340 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.15.0/src/lib.rs: as itertools::Itertools>::join (4x) . ); 3,296 ( 0.00%) } else if let Some(sub_attrs) = attr.meta_item_list() { 2,882 ( 0.00%) => ???:::meta_item_list (616x) 210 ( 0.00%) parent.push(attr_path); 630 ( 0.00%) for sub_attr in sub_attrs { . if let Some(meta) = sub_attr.meta_item() { 1,272 ( 0.00%) check_duplicated_attr(cx, meta, attr_paths, parent); 332,391 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/attrs/duplicated_attributes.rs:clippy_lints::attrs::duplicated_attributes::check_duplicated_attr'2 (212x) . } . } . parent.pop(); . } else { 7,368 ( 0.00%) emit_if_duplicated(cx, attr, attr_paths, format!("{}:{attr_path}", parent.iter().join(":"))); 9,768 ( 0.00%) => /home/moon/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.15.0/src/lib.rs: as itertools::Itertools>::join (407x) . } 17,688 ( 0.00%) } . . pub fn check(cx: &EarlyContext<'_>, attrs: &[Attribute]) { . let mut attr_paths = FxHashMap::default(); . . for attr in attrs { 164,755 ( 0.00%) if let Some(meta) = attr.meta() { 616,596 ( 0.02%) => ???:::meta (28,953x) 9,995 ( 0.00%) check_duplicated_attr(cx, &meta, &mut attr_paths, &mut Vec::new()); 783,178 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/attrs/duplicated_attributes.rs:clippy_lints::attrs::duplicated_attributes::check_duplicated_attr (1,999x) . } . } . } 1,041 ( 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; . 90,069 ( 0.00%) pub(crate) fn check(cx: &LateContext<'_>, pat: &Pat<'_>) { 25,734 ( 0.00%) if !pat.span.from_expansion() 17,542 ( 0.00%) && let PatKind::Struct(QPath::Resolved(_, path), fields, Some(dotdot)) = pat.kind . && let Some(def_id) = path.res.opt_def_id() 85 ( 0.00%) && let ty = cx.tcx.type_of(def_id).instantiate_identity().skip_norm_wip() 170 ( 0.00%) && let ty::Adt(def, _) = ty.kind() 222 ( 0.00%) && (def.is_struct() || def.is_union()) 9 ( 0.00%) && fields.len() == def.non_enum_variant().fields.len() 24 ( 0.00%) => ???:::non_enum_variant (3x) . && !def.non_enum_variant().is_field_list_non_exhaustive() . { . span_lint_and_then( . cx, . REST_PAT_IN_FULLY_BOUND_STRUCTS, . pat.span, . "unnecessary use of `..` pattern in struct binding. All fields were already bound", . |diag| { -- line 23 ---------------------------------------- -- line 25 ---------------------------------------- . dotdot, . "consider removing `..` from this binding", . "", . rustc_errors::Applicability::MachineApplicable, . ); . }, . ); . } 102,936 ( 0.00%) } 170 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/operators/const_comparisons.rs -------------------------------------------------------------------------------- Ir -- line 12 ---------------------------------------- . use clippy_utils::SpanlessEq; . use clippy_utils::diagnostics::span_lint_and_note; . use clippy_utils::source::snippet; . . use super::{IMPOSSIBLE_COMPARISONS, REDUNDANT_COMPARISONS}; . . // Extract a comparison between a const and non-const . // Flip yoda conditionals, turnings expressions like `42 < x` into `x > 42` 680 ( 0.00%) fn comparison_to_const<'tcx>( . cx: &LateContext<'tcx>, . typeck: &'tcx TypeckResults<'tcx>, . expr: &'tcx Expr<'tcx>, . ) -> Option<(CmpOp, &'tcx Expr<'tcx>, &'tcx Expr<'tcx>, Constant, Ty<'tcx>)> { 255 ( 0.00%) if let ExprKind::Binary(operator, left, right) = expr.kind . && let Ok(cmp_op) = CmpOp::try_from(operator.node) . { 51 ( 0.00%) let ecx = ConstEvalCtxt::with_env(cx.tcx, cx.typing_env(), typeck); 510 ( 0.00%) => ???:::typing_env (17x) 506 ( 0.00%) match (ecx.eval(left), ecx.eval(right)) { 4,225 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (34x) . (Some(_), Some(_)) => None, 52 ( 0.00%) (_, Some(con)) => Some((cmp_op, left, right, con, typeck.expr_ty(right))), 160 ( 0.00%) => ???:::expr_ty (4x) 24 ( 0.00%) (Some(con), _) => Some((cmp_op.reverse(), right, left, con, typeck.expr_ty(left))), 80 ( 0.00%) => ???:::expr_ty (2x) . _ => None, 6 ( 0.00%) } . } else { . None . } 680 ( 0.00%) } . 11,830 ( 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, . ) { 2,324 ( 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() . . // Check that both operands to '&&' compare a non-literal to a literal 113 ( 0.00%) && let Some((left_cmp_op, left_expr, left_const_expr, left_const, left_type)) = 405 ( 0.00%) comparison_to_const(cx, typeck, left_cond) 7,191 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/const_comparisons.rs:clippy_lints::operators::const_comparisons::comparison_to_const (81x) 14 ( 0.00%) && let Some((right_cmp_op, right_expr, right_const_expr, right_const, right_type)) = 24 ( 0.00%) comparison_to_const(cx, typeck, right_cond) 1,107 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/const_comparisons.rs:clippy_lints::operators::const_comparisons::comparison_to_const (4x) . 2 ( 0.00%) && left_type == right_type . . // Check that the same expression is compared in both comparisons 5 ( 0.00%) && SpanlessEq::new(cx).eq_expr(span.ctxt(), left_expr, right_expr) 1,294 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (1x) . 4 ( 0.00%) && !left_expr.can_have_side_effects() 19 ( 0.00%) => ???:::can_have_side_effects (1x) . . // Compare the two constant expressions . && let Some(ordering) = Constant::partial_cmp(cx.tcx(), left_type, &left_const, &right_const) . . // Rule out the `x >= 42 && x <= 42` corner case immediately . // Mostly to simplify the implementation, but it is also covered by `clippy::double_comparisons` . && !matches!( . (&left_cmp_op, &right_cmp_op, ordering), -- line 76 ---------------------------------------- -- line 122 ---------------------------------------- . cx, . IMPOSSIBLE_COMPARISONS, . span, . "boolean expression will never evaluate to 'true'", . None, . note, . ); . } 6 ( 0.00%) } 150 ( 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:: (6x) 13,520 ( 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 ---------------------------------------- -- line 169 ---------------------------------------- . Lt, . Le, . Ge, . Gt, . } . . impl CmpOp { . fn reverse(self) -> Self { 2 ( 0.00%) match self { . CmpOp::Lt => CmpOp::Gt, . CmpOp::Le => CmpOp::Ge, . CmpOp::Ge => CmpOp::Le, . CmpOp::Gt => CmpOp::Lt, . } . } . . fn direction(self) -> CmpOpDirection { -- line 185 ---------------------------------------- -- line 191 ---------------------------------------- . } . } . } . . impl TryFrom for CmpOp { . type Error = (); . . fn try_from(bin_op: BinOpKind) -> Result { 646 ( 0.00%) match bin_op { . BinOpKind::Lt => Ok(CmpOp::Lt), . BinOpKind::Le => Ok(CmpOp::Le), . BinOpKind::Ge => Ok(CmpOp::Ge), . BinOpKind::Gt => Ok(CmpOp::Gt), . _ => Err(()), . } . } . } -- line 207 ---------------------------------------- 777 ( 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 { 52,524 ( 0.00%) fn new(kind: ItemKindDescr, ident: Option, span: Span, mod_items: Option) -> Self { 35,016 ( 0.00%) Self { . kind, . name: ident.map(|ident| ident.name), . span: match ident { 3,103 ( 0.00%) Some(ident) => span.with_hi(ident.span.hi()), . None => span.shrink_to_lo(), . }, . mod_items, . } 35,016 ( 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 { 77,232 ( 0.00%) let SpanData { lo, hi, .. } = attr.span.data(); 102,976 ( 0.00%) let file = cx.sess().source_map().lookup_source_file(lo); 3,578,416 ( 0.10%) => ???:::lookup_source_file (25,744x) . 25,744 ( 0.00%) Some(Self { . span: attr.span, 102,976 ( 0.00%) kind: match attr.kind { . AttrKind::Normal(_) | AttrKind::Synthetic(_) => StopKind::Attr, . AttrKind::DocComment(comment_kind, _) => StopKind::Doc(comment_kind), . }, 77,232 ( 0.00%) first: file.lookup_line(file.relative_position(lo))?, 3,231,120 ( 0.09%) => ???:::lookup_line (25,744x) 51,488 ( 0.00%) last: file.lookup_line(file.relative_position(hi))?, 3,231,120 ( 0.09%) => ???:::lookup_line (25,744x) 51,488 ( 0.00%) name: attr.name(), 106,031 ( 0.00%) => ???:::name (25,744x) . }) . } . } . . /// 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()?; 920 ( 0.00%) let gap_span = prev_stop.span.between(next_stop.span); 19,688 ( 0.00%) => ???:::between (184x) . let gap_snippet = gap_span.get_text(cx)?; . . let mut has_comment = false; . let mut empty_lines = Vec::new(); . 2,392 ( 0.00%) for (token, source, inner_span) in tokenize_with_text(&gap_snippet) { 4,600 ( 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 (184x) 1,472 ( 0.00%) match token { . TokenKind::BlockComment { . doc_style: None, . terminated: true, . } . | TokenKind::LineComment { doc_style: None } => has_comment = true, . TokenKind::Whitespace => { 372 ( 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, . ); . } . } . 56,901 ( 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() 54,558 ( 0.00%) .filter(|attr| attr.style == AttrStyle::Outer && !attr.span.from_expansion()) 25,744 ( 0.00%) .map(|attr| Stop::from_attr(cx, attr)) . .collect::>>() . .unwrap_or_default(); . 4,377 ( 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 5,877 ( 0.00%) let span = self.items.last().unwrap().span; . if !span.from_expansion() 17,631 ( 0.00%) && let Ok(line) = cx.sess().source_map().lookup_line(span.lo()) 522,528 ( 0.01%) => ???:::lookup_line (1,959x) . { . 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, . }); 3,918 ( 0.00%) } . . let mut gaps = Vec::new(); . let mut last = 0; . for pos in outer . .array_windows() 25,744 ( 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; 2,576 ( 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); 35,016 ( 0.00%) } . } . . fn assoc_item_descr(kind: &AssocItemKind) -> &'static str { 12,865 ( 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(); . } . 20,584 ( 0.00%) fn check_impl_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 10,292 ( 0.00%) let kind = ItemKindDescr::Other(assoc_item_descr(&item.kind)); 15,438 ( 0.00%) let info = ItemInfo::new(kind, item.kind.ident(), item.span, None); 187,829 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::new (2,573x) 12,865 ( 0.00%) self.check_item_kind(cx, info, &item.attrs, item.id); 11,768,373 ( 0.32%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_item_kind (2,573x) 15,438 ( 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); . } . 18,040 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 9,171 ( 0.00%) let (kind, mod_items) = match &item.kind { . ItemKind::Mod(_, _, ModKind::Loaded(items, _, _)) => { . let first = items . .iter() 292 ( 0.00%) .filter(|i| !matches!(i.span.ctxt().outer_expn_data().kind, ExpnKind::AstPass(_))) 219 ( 0.00%) .map(|i| i.id) . .next(); . (ItemKindDescr::Module, first) . }, . ItemKind::Mod(..) => (ItemKindDescr::Module, None), 6,920 ( 0.00%) _ => (ItemKindDescr::Other(item.kind.descr()), None), . }; 9,020 ( 0.00%) let info = ItemInfo::new(kind, item.kind.ident(), item.span, mod_items); 102,856 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::new (1,804x) 9,020 ( 0.00%) self.check_item_kind(cx, info, &item.attrs, item.id); 3,900,291 ( 0.11%) => site/frontend/rust-clippy/clippy_lints/src/empty_line_after.rs:::check_item_kind (1,804x) 14,432 ( 0.00%) } . } 195,277 ( 0.01%) -------------------------------------------------------------------------------- -- 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. 3,672 ( 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`. 11,088 ( 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); 3,696 ( 0.00%) let float = matches!(lit_kind, LitKind::Float(..)); 4,928 ( 0.00%) Some(NumericLiteral::new(unsuffixed, suffix, float)) 78,936 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/numeric_literal.rs:::new (1,232x) . } else { . None . } 9,856 ( 0.00%) } . . /// Parses a raw numeric literal string into its structured `NumericLiteral` parts. . #[must_use] 8,652 ( 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. 185 ( 0.00%) let radix = if unsigned_lit.starts_with("0x") { . Radix::Hexadecimal 151 ( 0.00%) } else if unsigned_lit.starts_with("0b") { . Radix::Binary 112 ( 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) . }; . 2,399 ( 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); . 18,540 ( 0.00%) Self { . radix, . prefix, . integer, . fraction, . exponent, . suffix, . } 11,124 ( 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; . 2,472 ( 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()); 2,464 ( 0.00%) let suffix = match lit_kind { 4,926 ( 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 ---------------------------------------- 4,988 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs -------------------------------------------------------------------------------- Ir -- line 71 ---------------------------------------- . 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 Fn: [const] FnMut { . /// Performs the call operation. . #[unstable(feature = "fn_traits", issue = "29625")] 29 ( 0.00%) extern "rust-call" fn call(&self, args: Args) -> Self::Output; 254 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/manual_map.rs:clippy_lints::matches::manual_map::get_some_expr (1x) . } . . /// The version of the call operator that takes a mutable receiver. . /// . /// Instances of `FnMut` can be called repeatedly and may mutate state. . /// . /// `FnMut` is implemented automatically by closures which take mutable . /// references to captured variables, as well as all types that implement -- line 87 ---------------------------------------- -- 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")] 483 ( 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")] 13,596 ( 0.00%) extern "rust-call" fn call_once(self, args: Args) -> Self::Output; 5,152 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:::new (184x) . } . . mod impls { . use crate::marker::Tuple; . . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] . const impl Fn for &F -- line 258 ---------------------------------------- -- line 266 ---------------------------------------- . . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] . const impl FnMut for &F . where . F: [const] Fn, . { . extern "rust-call" fn call_mut(&mut self, args: A) -> F::Output { 219 ( 0.00%) (**self).call(args) 231,139 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ifs/same_functions_in_if_cond.rs:clippy_lints::ifs::same_functions_in_if_cond::check::{closure#0} (58x) . } . } . . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] . const impl FnOnce for &F . where . F: [const] Fn, -- line 282 ---------------------------------------- -- line 289 ---------------------------------------- . } . . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_trait_impl", issue = "143874")] . const impl FnMut for &mut F . where . F: [const] FnMut, . { 143,385 ( 0.00%) extern "rust-call" fn call_mut(&mut self, args: A) -> F::Output { 14,853 ( 0.00%) (*self).call_mut(args) 166,612 ( 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 { 1,663 ( 0.00%) (*self).call_mut(args) 722 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::tokenize_with_text::{closure#0} (22x) . } . } . } 293 ( 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<'_>) { 13,958 ( 0.00%) if let StmtKind::Semi(expr) = stmt.kind 5,036 ( 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); . }, . ); . } 5,720 ( 0.00%) } . 559,314 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 186,438 ( 0.01%) if expr.span.in_external_macro(cx.sess().source_map()) 137,589 ( 0.00%) || expr.span.desugaring_kind().is_some() 4,397,342 ( 0.12%) => ???:::desugaring_kind (45,863x) 349,808 ( 0.01%) || in_automatically_derived(cx.tcx, expr.hir_id) 38,485,048 ( 1.06%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::in_automatically_derived (43,726x) . { . return; . } . . used_underscore_binding(cx, expr); . used_underscore_items(cx, expr); 497,168 ( 0.01%) } . } . . fn used_underscore_items<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 266,463 ( 0.01%) let (def_id, ident) = match expr.kind { 2,835 ( 0.00%) ExprKind::Call(func, ..) => { 13,090 ( 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, ..) => { 19,137 ( 0.00%) if let Some(def_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id) { 326,129 ( 0.01%) => ???:::type_dependent_def_id (6,379x) 6,379 ( 0.00%) (def_id, path.ident) . } else { . return; . } 6,379 ( 0.00%) }, . ExprKind::Struct(QPath::Resolved(_, path), ..) => { 393 ( 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); 8,408 ( 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<'_>) { 258,808 ( 0.01%) let (definition_hir_id, ident) = match expr.kind { . ExprKind::Path(ref qpath) => { 67,652 ( 0.00%) if let QPath::Resolved(None, path) = qpath 90,342 ( 0.00%) && let Res::Local(id) = path.res 3,550 ( 0.00%) && is_used(cx, expr) . { 64,290 ( 0.00%) (id, last_path_segment(qpath).ident) 154,296 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::last_path_segment (12,858x) . } else { . return; . } 12,858 ( 0.00%) }, 8,982 ( 0.00%) ExprKind::Field(recv, ident) => { 2,994 ( 0.00%) if let Some(adt_def) = cx.typeck_results().expr_ty_adjusted(recv).ty_adt_def() 167,863 ( 0.00%) => ???:::expr_ty_adjusted (2,994x) . && let Some(field) = adt_def.all_fields().find(|field| field.name == ident.name) . && let Some(local_did) = field.did.as_local() 2,046 ( 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(); 15,795 ( 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 { 253,413 ( 0.01%) get_parent_expr(cx, expr).is_none_or(|parent| match parent.kind { 5,167,449 ( 0.14%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (43,099x) 1,775 ( 0.00%) ExprKind::Assign(_, rhs, _) | ExprKind::AssignOp(_, _, rhs) => { 8,875 ( 0.00%) SpanlessEq::new(cx).eq_expr(parent.span.ctxt(), rhs, expr) 5,136,047 ( 0.14%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (1,775x) . }, . _ => is_used(cx, parent), . }) . } 283,211 ( 0.01%) -------------------------------------------------------------------------------- -- 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 186,565 ( 0.01%) if let ExprKind::Let(lt) = expr.kind 1,143 ( 0.00%) && 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() . }, . _ => false, -- line 114 ---------------------------------------- -- 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, . ); . } . 137,222 ( 0.00%) if let ExprKind::MethodCall(method, lhs_expr, [rhs_expr], _) = expr.kind 17,488 ( 0.00%) && cx.ty_based_def(expr).opt_parent(cx).is_diag_item(cx, sym::PartialEq) . && !expr.span.from_expansion() . { . self.check_empty_expr( . cx, . expr.span, . lhs_expr, . peel_ref_operators(cx, rhs_expr), . if method.ident.name == sym::ne { . "!" . } else { . Default::default() . }, . ); . } . 124,736 ( 0.00%) if let ExprKind::Binary(Spanned { node: cmp, .. }, left, right) = expr.kind 3,380 ( 0.00%) && !expr.span.from_expansion() . { . // expr.span might contains parenthesis, see issue #10529 1,515 ( 0.00%) let actual_span = span_without_enclosing_paren(cx, expr.span); 6,330 ( 0.00%) match cmp { . BinOpKind::Eq => { 2,200 ( 0.00%) self.check_cmp(cx, actual_span, left, right, "", 0); // len == 0 218,770 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/len_zero.rs:::check_cmp (200x) 1,600 ( 0.00%) self.check_cmp(cx, actual_span, right, left, "", 0); // 0 == len . }, . BinOpKind::Ne => { 871 ( 0.00%) self.check_cmp(cx, actual_span, left, right, "!", 0); // len != 0 5,572 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/len_zero.rs:::check_cmp (67x) 469 ( 0.00%) self.check_cmp(cx, actual_span, right, left, "!", 0); // 0 != len . }, . BinOpKind::Gt => { 1,155 ( 0.00%) self.check_cmp(cx, actual_span, left, right, "!", 0); // len > 0 6,888 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/len_zero.rs:::check_cmp (105x) 735 ( 0.00%) self.check_cmp(cx, actual_span, right, left, "", 1); // 1 > len . }, . BinOpKind::Lt => { 1,155 ( 0.00%) self.check_cmp(cx, actual_span, left, right, "", 1); // len < 1 6,139 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/len_zero.rs:::check_cmp (105x) 630 ( 0.00%) self.check_cmp(cx, actual_span, right, left, "!", 0); // 0 < len . }, 318 ( 0.00%) BinOpKind::Ge => self.check_cmp(cx, actual_span, left, right, "!", 1), // len >= 1 325 ( 0.00%) BinOpKind::Le => self.check_cmp(cx, actual_span, right, left, "!", 1), // 1 <= len . _ => (), . } . } 497,168 ( 0.01%) } . } . . impl LenZero { 9,648 ( 0.00%) fn check_cmp( . &self, . cx: &LateContext<'_>, . span: Span, . method: &Expr<'_>, . lit: &Expr<'_>, . op: &str, . compare_to: u32, . ) { 2,144 ( 0.00%) if method.span.from_expansion() { . return; . } . 2,774 ( 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 220 ( 0.00%) if parent_item_name(cx, method) == Some(sym::is_empty) { 7,605 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::parent_item_name (44x) . return; . } . 156 ( 0.00%) self.check_len(cx, span, method_path.ident.name, receiver, &lit.node, op, compare_to); . } else { 8,224 ( 0.00%) self.check_empty_expr(cx, span, method, lit, op); 27,998 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/len_zero.rs:::check_empty_expr (1,028x) . } 352 ( 0.00%) } . . #[expect(clippy::too_many_arguments)] . fn check_len( . &self, . cx: &LateContext<'_>, . span: Span, . method_name: Symbol, . receiver: &Expr<'_>, . lit: &LitKind, . op: &str, . compare_to: u32, . ) { 159 ( 0.00%) if let LitKind::Int(lit, _) = *lit { . // check if length is compared to the specified number . if lit != u128::from(compare_to) { . return; . } . 10 ( 0.00%) if method_name == sym::len && has_is_empty(cx, receiver, self.msrv) { 166 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/len_zero.rs:clippy_lints::len_zero::has_is_empty (2x) 2 ( 0.00%) let mut applicability = Applicability::MachineApplicable; 20 ( 0.00%) span_lint_and_sugg( 480,009 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_sugg:: (2x) . cx, . LEN_ZERO, . span, 24 ( 0.00%) format!("length comparison to {}", if compare_to == 0 { "zero" } else { "one" }), 4 ( 0.00%) format!("using `{op}is_empty` is clearer and more explicit"), 10 ( 0.00%) format!( . "{op}{}.is_empty()", 10 ( 0.00%) snippet_with_context(cx, receiver.span, span.ctxt(), "_", &mut applicability).0, . ), . applicability, . ); . } . } . } . 14,392 ( 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, . ); . } 8,224 ( 0.00%) } . } . . fn span_without_enclosing_paren(cx: &LateContext<'_>, span: Span) -> Span { 10,605 ( 0.00%) let Some(snippet) = span.get_text(cx) else { . return span; . }; 4,545 ( 0.00%) if has_enclosing_paren(snippet) { 139,656 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/sugg.rs:clippy_utils::sugg::has_enclosing_paren:: (1,515x) 139 ( 0.00%) let source_map = cx.tcx.sess.source_map(); 556 ( 0.00%) let left_paren = source_map.start_point(span); 46,541 ( 0.00%) => ???:::start_point (139x) 417 ( 0.00%) let right_parent = source_map.end_point(span); 59,583 ( 0.00%) => ???:::end_point (139x) 278 ( 0.00%) left_paren.between(right_parent) 27,383 ( 0.00%) => ???:::between (139x) . } else { . span . } . } . . fn is_empty_string(expr: &Expr<'_>) -> bool { 2,296 ( 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 { 3,086 ( 0.00%) if let ExprKind::Array(arr) = expr.kind { . return arr.is_empty(); . } . false . } . . /// Checks if this type has an `is_empty` method. 18 ( 0.00%) fn has_is_empty(cx: &LateContext<'_>, expr: &Expr<'_>, msrv: Msrv) -> bool { . /// Gets an `AssocItem` and return true if it matches `is_empty(self)`. . fn is_is_empty_and_stable(cx: &LateContext<'_>, item: &ty::AssocItem, msrv: Msrv) -> bool { . if item.is_fn() { . let sig = cx.tcx.fn_sig(item.def_id).skip_binder(); . let ty = sig.skip_binder(); . ty.inputs().len() == 1 && msrv.is_stable(cx, item.def_id) . } else { . false -- line 303 ---------------------------------------- -- line 310 ---------------------------------------- . cx.tcx . .associated_items(*imp) . .filter_by_name_unhygienic(sym::is_empty) . .any(|item| is_is_empty_and_stable(cx, item, msrv)) . }) . } . . fn ty_has_is_empty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, depth: usize, msrv: Msrv) -> bool { 18 ( 0.00%) match ty.kind() { . ty::Dynamic(tt, ..) => tt.principal().is_some_and(|principal| { . cx.tcx . .associated_items(principal.def_id()) . .filter_by_name_unhygienic(sym::is_empty) . .any(|item| is_is_empty_and_stable(cx, item, msrv)) . }), . &ty::Alias( . _, -- line 326 ---------------------------------------- -- line 339 ---------------------------------------- . .is_some_and(|deref_ty| ty_has_is_empty(cx, deref_ty, depth + 1, msrv)) . })) . }, . ty::Array(..) | ty::Slice(..) | ty::Str => true, . _ => false, . } . } . 4 ( 0.00%) ty_has_is_empty(cx, cx.typeck_results().expr_ty(expr).peel_refs(), 0, msrv) 80 ( 0.00%) => ???:::expr_ty (2x) 16 ( 0.00%) } 24,851 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/let_underscore.rs -------------------------------------------------------------------------------- Ir -- line 130 ---------------------------------------- . declare_lint_pass!(LetUnderscore => [ . LET_UNDERSCORE_FUTURE, . LET_UNDERSCORE_LOCK, . LET_UNDERSCORE_MUST_USE, . LET_UNDERSCORE_UNTYPED, . ]); . . impl<'tcx> LateLintPass<'tcx> for LetUnderscore { 14,462 ( 0.00%) fn check_local(&mut self, cx: &LateContext<'tcx>, local: &LetStmt<'tcx>) { 4,132 ( 0.00%) if matches!(local.source, LocalSource::Normal) 6,198 ( 0.00%) && let PatKind::Wild = local.pat.kind 351 ( 0.00%) && let Some(init) = local.init 70 ( 0.00%) && !local.span.in_external_macro(cx.tcx.sess.source_map()) . { 10 ( 0.00%) let init_ty = cx.typeck_results().expr_ty(init); 400 ( 0.00%) => ???:::expr_ty (10x) 20 ( 0.00%) let contains_sync_guard = init_ty.walk().any(|inner| match inner.kind() { 70 ( 0.00%) => ???:::walk (10x) . GenericArgKind::Type(inner_ty) => inner_ty . .ty_adt_def() . .is_some_and(|adt| paths::PARKING_LOT_GUARDS.iter().any(|path| path.matches(cx, adt.did()))), . GenericArgKind::Lifetime(_) | GenericArgKind::Const(_) => false, . }); 10 ( 0.00%) if contains_sync_guard { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then( . cx, . LET_UNDERSCORE_LOCK, . local.span, . "non-binding `let` on a synchronization lock", . |diag| { . diag.help( . "consider using an underscore-prefixed named \ . binding or dropping explicitly with `std::mem::drop`", . ); . }, . ); 10 ( 0.00%) } else if local.ty.is_none() 30 ( 0.00%) && let Some(future_trait_def_id) = cx.tcx.lang_items().future_trait() 400 ( 0.00%) => ???:::lang_items (10x) 110 ( 0.00%) && implements_trait(cx, cx.typeck_results().expr_ty(init), future_trait_def_id, &[]) 48,200 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (10x) 400 ( 0.00%) => ???:::expr_ty (10x) . { . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] . span_lint_and_then( . cx, . LET_UNDERSCORE_FUTURE, . local.span, . "non-binding `let` on a future", . |diag| { . diag.help("consider awaiting the future or dropping explicitly with `std::mem::drop`"); . }, . ); 95 ( 0.00%) } else if let Some(must_use_path) = opt_must_use_path(cx, cx.typeck_results().expr_ty(init)) { 40,941 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::opt_must_use_path (10x) 400 ( 0.00%) => ???:::expr_ty (10x) 27 ( 0.00%) span_lint_and_then( 4,732 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::check_local::{closure#3}> (3x) . cx, . LET_UNDERSCORE_MUST_USE, . local.span, . "non-binding `let` on an expression with `#[must_use]` type", 15 ( 0.00%) |diag| { . diag.help("consider explicitly using expression value"); . let ty_span = local.ty.map_or(init.span, |ty| ty.span); . diag.span_note( . ty_span, . format!("type is {}", describe_must_use_type(cx, &must_use_path)), . ); . }, . ); 38 ( 0.00%) } else if is_must_use_func_call(cx, init) { 2,119 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_must_use_func_call (7x) 45 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue:: (3x) . #[expect(clippy::collapsible_span_lint_calls, reason = "rust-clippy#7797")] 14 ( 0.00%) span_lint_and_then( 2,504 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::check_local::{closure#4}> (2x) . cx, . LET_UNDERSCORE_MUST_USE, . local.span, . "non-binding `let` on a result of a `#[must_use]` function", . |diag| { . diag.help("consider explicitly using function result"); . }, . ); . } . 40 ( 0.00%) if local.pat.default_binding_modes && local.ty.is_none() { . // When `default_binding_modes` is true, the `let` keyword is present. . . // Ignore unnameable types . if let Some(init) = local.init 30 ( 0.00%) && !cx.typeck_results().expr_ty(init).is_suggestable(cx.tcx, true) 400 ( 0.00%) => ???:::expr_ty (10x) . { . return; . } . . // Ignore if it is from a procedural macro... 40 ( 0.00%) if is_from_proc_macro(cx, init) { 7,903 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::is_from_proc_macro:: (10x) . return; . } . 100 ( 0.00%) span_lint_and_then( 16,814 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::check_local::{closure#5}> (10x) . cx, . LET_UNDERSCORE_UNTYPED, . local.span, . "non-binding `let` without a type annotation", . |diag| { . diag.span_help( . Span::new( . local.pat.span.hi(), -- line 230 ---------------------------------------- -- line 233 ---------------------------------------- . local.pat.span.parent(), . ), . "consider adding a type annotation", . ); . }, . ); . } . } 16,528 ( 0.00%) } . } 2,203 ( 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 { 57,906 ( 0.00%) if !attr.span.from_expansion() 54,884 ( 0.00%) && let AttrKind::Normal(ref normal) = attr.kind 1,851 ( 0.00%) && attr.doc_str().is_some() 9,257 ( 0.00%) => ???:::doc_str (617x) . && 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 21 ---------------------------------------- -------------------------------------------------------------------------------- -- 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 137,476 ( 0.00%) if let hir::ExprKind::MethodCall(is_some_path, to_digit_expr, [], _) = &expr.kind 7,492 ( 0.00%) && is_some_path.ident.name == sym::is_some . { 260 ( 0.00%) let match_result = match to_digit_expr.kind { 39 ( 0.00%) hir::ExprKind::MethodCall(to_digits_path, char_arg, [radix_arg], _) => { 5 ( 0.00%) if to_digits_path.ident.name == sym::to_digit . && cx.typeck_results().expr_ty_adjusted(char_arg).is_char() . { . Some((true, char_arg, radix_arg)) . } else { . None . } . }, . hir::ExprKind::Call(to_digits_call, [char_arg, radix_arg]) => { -- line 65 ---------------------------------------- -- line 89 ---------------------------------------- . format!("{char_arg_snip}.is_digit({radix_snip})") . } else { . format!("char::is_digit({char_arg_snip}, {radix_snip})") . }, . applicability, . ); . } . } 497,168 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_different_sizes.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use rustc_ast::Mutability; . use rustc_hir::{Expr, ExprKind, Node}; . use rustc_lint::LateContext; . use rustc_middle::ty::layout::LayoutOf as _; . use rustc_middle::ty::{self, Ty, TypeAndMut}; . . use super::CAST_SLICE_DIFFERENT_SIZES; . 683,606 ( 0.02%) pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>, msrv: Msrv) { . // if this cast is the child of another cast expression then don't emit something for it, the full . // chain will be analyzed 235,520 ( 0.01%) if is_child_of_cast(cx, expr) { . return; . } . 62,102 ( 0.00%) if let Some(CastChainInfo { . left_cast, . start_ty, . end_ty, 310,510 ( 0.01%) }) = expr_cast_chain_tys(cx, expr) 1,524,200 ( 0.04%) => site/frontend/rust-clippy/clippy_lints/src/casts/cast_slice_different_sizes.rs:clippy_lints::casts::cast_slice_different_sizes::expr_cast_chain_tys (62,102x) . && 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, . ); . }, . ); . } . } 497,168 ( 0.01%) } . . fn is_child_of_cast(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 124,292 ( 0.00%) let parent = cx.tcx.parent_hir_node(expr.hir_id); 6,865,754 ( 0.19%) => ???:::parent_hir_node (62,146x) 303,152 ( 0.01%) let expr = match parent { 3,789 ( 0.00%) Node::Block(block) => { 11,367 ( 0.00%) if let Some(parent_expr) = block.expr { . parent_expr . } else { . return false; . } . }, 90,586 ( 0.00%) Node::Expr(expr) => expr, . _ => return false, . }; . 49,082 ( 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> { 52 ( 0.00%) match ty.kind() { . ty::RawPtr(slice_ty, mutbl) => match slice_ty.kind() { . ty::Slice(ty) => Some(TypeAndMut { ty: *ty, mutbl: *mutbl }), . _ => None, . }, . _ => None, . } . } . -- line 96 ---------------------------------------- -- 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 496,816 ( 0.01%) fn expr_cast_chain_tys<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'tcx>) -> Option> { 62,076 ( 0.00%) if let ExprKind::Cast(cast_expr, _cast_to_hir_ty) = expr.peel_blocks().kind { 78 ( 0.00%) let cast_to = cx.typeck_results().expr_ty(expr); 1,040 ( 0.00%) => ???:::expr_ty (26x) . 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,076 ( 0.00%) None . } 496,816 ( 0.01%) } 186,350 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/map_unit_fn.rs -------------------------------------------------------------------------------- Ir -- line 257 ---------------------------------------- . ); . diag.span_suggestion_verbose(stmt.span, SUGG_MSG, suggestion, Applicability::HasPlaceholders); . } . }); . } . } . . impl LateLintPass<'_> for MapUnit { 40,040 ( 0.00%) fn check_stmt(&mut self, cx: &LateContext<'_>, stmt: &hir::Stmt<'_>) { 13,958 ( 0.00%) if let hir::StmtKind::Semi(expr) = stmt.kind 5,036 ( 0.00%) && !stmt.span.from_expansion() 17,856 ( 0.00%) && let Some(arglists) = method_chain_args(expr, &[sym::map]) 312,125 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::method_chain_args (2,232x) . { . lint_map_unit_fn(cx, stmt, expr, arglists[0]); . } 45,760 ( 0.00%) } . } 5,036 ( 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}; . 15,066 ( 0.00%) pub(super) fn check_body<'tcx>( . cx: &LateContext<'tcx>, . body: &Body<'tcx>, . item_id: OwnerId, . sig: &FnSig<'tcx>, . is_trait_item: bool, . ) { 3,348 ( 0.00%) if !matches!(sig.header.abi, ExternAbi::Rust) { . // Ignore `extern` functions with non-Rust calling conventions . return; . } . . let decl = sig.decl; 1,674 ( 0.00%) let sig = cx . .tcx . .fn_sig(item_id) . .instantiate_identity() . .skip_norm_wip() . .skip_binder(); 10,044 ( 0.00%) let lint_args: Vec<_> = check_fn_args(cx, sig, decl.inputs, body.params) 34 ( 0.00%) .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", . iter::once((args.span, format!("{}{}", args.ref_prefix, args.deref_ty.display(cx)))) -- line 53 ---------------------------------------- -- line 57 ---------------------------------------- . format!("{}{}", r.self_span.get_text(cx).unwrap(), r.replacement), . ) . })) . .collect(), . Applicability::Unspecified, . ); . }); . } 13,392 ( 0.00%) } . 406 ( 0.00%) pub(super) fn check_trait_item<'tcx>(cx: &LateContext<'tcx>, item_id: OwnerId, sig: &FnSig<'tcx>) { 116 ( 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, 58 ( 0.00%) cx.tcx . .fn_sig(item_id) . .instantiate_identity() . .skip_norm_wip() . .skip_binder(), 174 ( 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, . ); . }); . } 464 ( 0.00%) } . . #[derive(Default)] . struct PtrArgResult { . skip: bool, . replacements: Vec, . } . . struct PtrArgReplacement { -- line 102 ---------------------------------------- -- line 166 ---------------------------------------- . } . . enum DerefTy<'tcx> { . Str, . Path, . Slice(Option, Ty<'tcx>), . } . impl<'tcx> DerefTy<'tcx> { 119 ( 0.00%) fn ty(&self, cx: &LateContext<'tcx>) -> Ty<'tcx> { 64 ( 0.00%) match *self { 4 ( 0.00%) Self::Str => cx.tcx.types.str_, . Self::Path => Ty::new_adt( . cx.tcx, . cx.tcx.adt_def(cx.tcx.get_diagnostic_item(sym::Path).unwrap()), . List::empty(), . ), . Self::Slice(_, ty) => Ty::new_slice(cx.tcx, ty), . } 119 ( 0.00%) } . . fn argless_str(&self) -> &'static str { . match *self { . Self::Str => "str", . Self::Path => "Path", . Self::Slice(..) => "[_]", . } . } -- line 192 ---------------------------------------- -- 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))| { 14,412 ( 0.00%) if let ty::Ref(_, ty, mutability) = *ty.kind() 3,838 ( 0.00%) && let ty::Adt(adt, args) = *ty.kind() 3,186 ( 0.00%) && let TyKind::Ref(lt, ref ty) = hir_ty.kind 12,744 ( 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` 6,372 ( 0.00%) && let [.., name] = path.segments 6,372 ( 0.00%) && cx.tcx.item_name(adt.did()) == name.ident.name . { 1,992 ( 0.00%) let emission_id = params.get(i).map_or(hir_ty.hir_id, |param| param.hir_id); 6,351 ( 0.00%) let (method_renames, deref_ty) = match cx.tcx.get_diagnostic_name(adt.did()) { 689 ( 0.00%) => ???:::get_diagnostic_name (13x) . Some(sym::Vec) => ( . [(sym::clone, ".to_owned()")].as_slice(), . DerefTy::Slice( 60 ( 0.00%) if let Some(name_args) = name.args 105 ( 0.00%) && let [GenericArg::Type(ty), ..] = name_args.args . { 60 ( 0.00%) Some(ty.span) . } else { . None . }, . args.type_at(0), . ), . ), 970 ( 0.00%) _ if Some(adt.did()) == cx.tcx.lang_items().string() => ( 520 ( 0.00%) => ???:::lang_items (13x) . [(sym::clone, ".to_owned()"), (sym::as_str, "")].as_slice(), . DerefTy::Str, . ), . Some(sym::PathBuf) => ( . [(sym::clone, ".to_path_buf()"), (sym::as_path, "")].as_slice(), . DerefTy::Path, . ), . Some(sym::Cow) if mutability == Mutability::Not => { -- line 240 ---------------------------------------- -- line 317 ---------------------------------------- . /// The results for each argument (len should match args.len) . results: Vec, . /// The number of arguments which can't be linted. Used to return early. . skip_count: usize, . } . impl<'tcx> Visitor<'tcx> for V<'_, 'tcx> { . type NestedFilter = nested_filter::OnlyBodies; . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { 5 ( 0.00%) self.cx.tcx . } . . fn visit_anon_const(&mut self, _: &'tcx AnonConst) {} . 16,058 ( 0.00%) fn visit_expr(&mut self, e: &'tcx Expr<'_>) { 6,882 ( 0.00%) if self.skip_count == self.args.len() { . return; . } . . // Check if this is local we care about 676 ( 0.00%) let Some(&args_idx) = e.res_local_id().and_then(|id| self.bindings.get(&id)) else { 3,708 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::get:: (164x) 532 ( 0.00%) return walk_expr(self, e); 61,191 ( 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:: (17x) . }; 60 ( 0.00%) let args = &self.args[args_idx]; . let result = &mut self.results[args_idx]; . . // Helper function to handle early returns. . let mut set_skip_flag = || { 34 ( 0.00%) if !result.skip { 17 ( 0.00%) self.skip_count += 1; . } 17 ( 0.00%) result.skip = true; . }; . 140 ( 0.00%) match get_expr_use_or_unification_node(self.cx.tcx, e) { 4,018 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_or_unification_node (20x) . Some((Node::Stmt(_), _)) => (), . Some((Node::LetStmt(l), _)) => { . // Only trace simple bindings. e.g `let x = y;` . if let PatKind::Binding(BindingMode::NONE, id, ident, None) = l.pat.kind . // Let's not lint for the current parameter. The user may still intend to mutate . // (or, if not mutate, then perhaps call a method that's not otherwise available . // for) the referenced value behind the parameter through this local let binding . // with the underscore being only temporary. . && !ident.name.as_str().starts_with('_') . { . self.bindings.insert(id, args_idx); . } else { . set_skip_flag(); . } . }, 60 ( 0.00%) Some((Node::Expr(use_expr), child_id)) => { 72 ( 0.00%) if let ExprKind::Index(e, ..) = use_expr.kind . && e.hir_id == child_id . { . // Indexing works with both owned and its dereferenced type . return; . } . 16 ( 0.00%) if let ExprKind::MethodCall(name, receiver, ..) = use_expr.kind 16 ( 0.00%) && receiver.hir_id == child_id . { 12 ( 0.00%) let name = name.ident.name; . . // Check if the method can be renamed. 12 ( 0.00%) if let Some((_, replacement)) = args.method_renames.iter().find(|&&(x, _)| x == name) { . result.replacements.push(PtrArgReplacement { . expr_span: use_expr.span, . self_span: receiver.span, . replacement, . }); . return; . } . -- line 388 ---------------------------------------- -- line 391 ---------------------------------------- . // but it would still be valid to call with a slice . if VEC_METHODS_SHADOWING_SLICE_METHODS.contains(&name) { . return; . } . } . . // If the expression's type gets adjusted down to the deref type, we might as . // well have started with that deref type -- the lint should fire 119 ( 0.00%) let deref_ty = args.deref_ty.ty(self.cx); 1,874 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_arg.rs:::ty (17x) 51 ( 0.00%) let adjusted_ty = self.cx.typeck_results().expr_ty_adjusted(e).peel_refs(); 901 ( 0.00%) => ???:::expr_ty_adjusted (17x) 17 ( 0.00%) if adjusted_ty == deref_ty { . return; . } . . // If the expression's type is constrained by `dyn Trait`, see if the deref . // type implements the trait(s) as well, and if so, the lint should fire 34 ( 0.00%) if let ty::Dynamic(preds, ..) = adjusted_ty.kind() . && matches_preds(self.cx, deref_ty, preds) . { . return; . } . . set_skip_flag(); . }, 17 ( 0.00%) _ => set_skip_flag(), . } 18,352 ( 0.00%) } . } . 1,674 ( 0.00%) let mut skip_count = 0; 3,348 ( 0.00%) let mut results = args.iter().map(|_| PtrArgResult::default()).collect::>(); 21,762 ( 0.00%) let mut v = V { . cx, . bindings: args . .iter() . .enumerate() . .filter_map(|(i, arg)| { 51 ( 0.00%) let param = &body.params[arg.idx]; 153 ( 0.00%) match param.pat.kind { 51 ( 0.00%) PatKind::Binding(BindingMode::NONE, id, ident, None) 187 ( 0.00%) if !is_lint_allowed(cx, PTR_ARG, param.hir_id) 20,247 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (17x) . // Let's not lint for the current parameter. The user may still intend to mutate . // (or, if not mutate, then perhaps call a method that's not otherwise available . // for) the referenced value behind the parameter with the underscore being only . // temporary. 17 ( 0.00%) && !ident.name.as_str().starts_with('_') => . { . Some((id, i)) . }, . _ => { . skip_count += 1; . results[i].skip = true; . None . }, . } . }) . .collect(), . args, 6,696 ( 0.00%) results, 1,674 ( 0.00%) skip_count, . }; 5,022 ( 0.00%) v.visit_expr(body.value); 91,374 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_arg.rs:::visit_expr (1,674x) 6,696 ( 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 ---------------------------------------- 26,138 ( 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()`. 20,826 ( 0.00%) pub(super) fn check( . cx: &LateContext<'_>, . info: &crate::methods::BinaryExprInfo<'_>, . chain_methods: &[Symbol], . lint: &'static Lint, . suggest: &str, . ) -> bool { 9,612 ( 0.00%) if let Some(args) = method_chain_args(info.chain, chain_methods) 223,765 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::method_chain_args (1,602x) . && 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 . } 14,418 ( 0.00%) } 1,602 ( 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 244 ---------------------------------------- . #[rustc_allow_incoherent_impl] . #[stable(feature = "slice_sort_by_key", since = "1.7.0")] . #[inline] . pub fn sort_by_key(&mut self, mut f: F) . where . F: FnMut(&T) -> K, . K: Ord, . { 24 ( 0.00%) stable_sort(self, |a, b| f(a).lt(&f(b))); . } . . /// Sorts the slice in ascending order with a key extraction function, preserving initial order . /// of equal elements. . /// . /// This sort is stable (i.e., does not reorder equal elements) and *O*(*m* \* *n* + *n* \* . /// log(*n*)) worst-case, where the key function is *O*(*m*). . /// -- line 260 ---------------------------------------- -- 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; 190 ( 0.00%) slots[i].write(b.clone()); 7,091 ( 0.00%) => ???:::clone (95x) . } . core::mem::forget(guard); . // SAFETY: . // the vec was allocated and initialized above to at least this length. . unsafe { . vec.set_len(s.len()); . } 20,815 ( 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. 13,119 ( 0.00%) if len > 0 { . unsafe { . s.as_ptr().copy_to_nonoverlapping(v.as_mut_ptr(), len); . v.set_len(len); . } . } . v . } . } -- line 460 ---------------------------------------- -- line 502 ---------------------------------------- . /// . /// ```should_panic . /// // this will panic at runtime . /// b"0123456789abcdef".repeat(usize::MAX); . /// ``` . #[rustc_allow_incoherent_impl] . #[cfg(not(no_global_oom_handling))] . #[stable(feature = "repeat_generic_slice", since = "1.40.0")] 1,080 ( 0.00%) pub fn repeat(&self, n: usize) -> Vec . where . T: Copy, . { 270 ( 0.00%) if n == 0 { . return Vec::new(); . } . . // If `n` is larger than zero, it can be split as . // `n = 2^expn + rem (2^expn > rem, expn >= 0, rem >= 0)`. . // `2^expn` is the number represented by the leftmost '1' bit of `n`, . // and `rem` is the remaining part of `n`. . -- line 522 ---------------------------------------- -- line 524 ---------------------------------------- . let capacity = self.len().checked_mul(n).expect("capacity overflow"); . let mut buf = Vec::with_capacity(capacity); . . // `2^expn` repetition is done by doubling `buf` `expn`-times. . buf.extend(self); . { . let mut m = n >> 1; . // If `m > 0`, there are remaining bits up to the leftmost '1'. 426 ( 0.00%) while m > 0 { . // `buf.extend(buf)`: . unsafe { . ptr::copy_nonoverlapping::( . buf.as_ptr(), . (buf.as_mut_ptr()).add(buf.len()), . buf.len(), . ); . // `buf` has capacity of `self.len() * n`. . let buf_len = buf.len(); 294 ( 0.00%) buf.set_len(buf_len * 2); . } . . m >>= 1; . } . } . . // `rem` (`= n - 2^expn`) repetition is done by copying . // first `rem` repetitions from `buf` itself. . let rem_len = capacity - buf.len(); // `self.len() * rem` 264 ( 0.00%) if rem_len > 0 { . // `buf.extend(buf[0 .. rem_len])`: . unsafe { . // This is non-overlapping since `2^expn > rem`. . ptr::copy_nonoverlapping::( . buf.as_ptr(), . (buf.as_mut_ptr()).add(buf.len()), . rem_len, . ); . // `buf.len() + rem_len` equals to `buf.capacity()` (`= self.len() * n`). . buf.set_len(capacity); . } . } 528 ( 0.00%) buf 1,215 ( 0.00%) } . . /// Flattens a slice of `T` into a single value `Self::Output`. . /// . /// # Examples . /// . /// ``` . /// assert_eq!(["hello", "world"].concat(), "helloworld"); . /// assert_eq!([[1, 2], [3, 4]].concat(), [1, 2, 3, 4]); -- line 574 ---------------------------------------- 7,426 ( 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]>`. 18,004 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 6,234 ( 0.00%) if let ItemKind::Impl(imp) = item.kind 2,180 ( 0.00%) && let Some(of_trait) = imp.of_trait 2,523 ( 0.00%) && let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() 4,205 ( 0.00%) && let Some(hash_id) = cx.tcx.get_diagnostic_item(sym::Hash) 89,146 ( 0.00%) => ???:::get_diagnostic_item (841x) 7,569 ( 0.00%) && Res::Def(DefKind::Trait, hash_id) == of_trait.trait_ref.path.res 27,773 ( 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 (841x) 50 ( 0.00%) && let Some(borrow_id) = cx.tcx.get_diagnostic_item(sym::Borrow) 1,060 ( 0.00%) => ???:::get_diagnostic_item (10x) . // 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]>` 110 ( 0.00%) && implements_trait(cx, ty, borrow_id, &[cx.tcx.types.str_.into()]) 176,753 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (10x) . && implements_trait(cx, ty, borrow_id, &[Ty::new_slice(cx.tcx, cx.tcx.types.u8).into()]) . { . span_lint_and_then( . cx, . IMPL_HASH_BORROW_WITH_STR_AND_BYTES, . of_trait.trait_ref.path.span, . "the semantics of `Borrow` around `Hash` can't be satisfied when both `Borrow` and `Borrow<[u8]>` are implemented", . |diag| { -- line 96 ---------------------------------------- -- line 99 ---------------------------------------- . "however, the hash implementations of a string (`str`) and the bytes of a string `[u8]` do not behave the same ..." . ); . diag.note("... as (`hash(\"abc\") != hash(\"abc\".as_bytes())`"); . diag.help("consider either removing one of the `Borrow` implementations (`Borrow` or `Borrow<[u8]>`) ..."); . diag.help("... or not implementing `Hash` for this type"); . }, . ); . } 20,576 ( 0.00%) } . } 861 ( 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 { 7,934 ( 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> { 379,760 ( 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])> { 10,590 ( 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])> { 4,964 ( 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,101,786 ( 0.03%) 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> { 11,476 ( 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]> { 177,694 ( 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]> { 594 ( 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 970 ---------------------------------------- . /// let mut v = [1, 2, 3]; . /// v.reverse(); . /// assert!(v == [3, 2, 1]); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_slice_reverse", since = "1.90.0")] . #[inline] . pub const fn reverse(&mut self) { 162 ( 0.00%) let half_len = self.len() / 2; . let Range { start, end } = self.as_mut_ptr_range(); . . // These slices will skip the middle item for an odd length, . // since that one doesn't need to move. . let (front_half, back_half) = . // SAFETY: Both are subparts of the original slice, so the memory . // range is valid, and they don't overlap because they're each only . // half (or less) of the original slice. -- line 986 ---------------------------------------- -- line 1005 ---------------------------------------- . // this check tells LLVM that the indexing below is . // in-bounds. Then after inlining -- once the actual . // lengths of the slices are known -- it's removed. . // FIXME(const_trait_impl) replace with let (a, b) = (&mut a[..n], &mut b[..n]); . let (a, _) = a.split_at_mut(n); . let (b, _) = b.split_at_mut(n); . . let mut i = 0; 147 ( 0.00%) while i < n { 91 ( 0.00%) mem::swap(&mut a[i], &mut b[n - 1 - i]); . i += 1; . } . } . } . . /// Returns an iterator over the slice. . /// . /// The iterator yields all items from start to end. -- line 1022 ---------------------------------------- -- line 1391 ---------------------------------------- . /// ``` . #[stable(feature = "slice_as_chunks", since = "1.88.0")] . #[rustc_const_stable(feature = "slice_as_chunks", since = "1.88.0")] . #[inline] . #[track_caller] . #[must_use] . pub const fn as_chunks<#[rustc_panics_when_zero] const N: usize>(&self) -> (&[[T; N]], &[T]) { . assert!(N != 0, "chunk size must be non-zero"); 40 ( 0.00%) let len_rounded_down = self.len() / N * N; . // SAFETY: The rounded-down value is always the same or smaller than the . // original length, and thus must be in-bounds of the slice. . let (multiple_of_n, remainder) = unsafe { self.split_at_unchecked(len_rounded_down) }; . // SAFETY: We already panicked for zero, and ensured by construction . // that the length of the subslice is a multiple of N. . let array_slice = unsafe { multiple_of_n.as_chunks_unchecked() }; . (array_slice, remainder) . } -- line 1407 ---------------------------------------- -- line 2054 ---------------------------------------- . . assert_unsafe_precondition!( . check_library_ub, . "slice::split_at_unchecked requires the index to be within the slice", . (mid: usize = mid, len: usize = len) => mid <= len, . ); . . // SAFETY: Caller has to check that `0 <= mid <= self.len()` 60 ( 0.00%) unsafe { (from_raw_parts(ptr, mid), from_raw_parts(ptr.add(mid), unchecked_sub(len, mid))) } . } . . /// Divides one mutable slice into two at an index, without doing bounds checking. . /// . /// The first will contain all indices from `[0, mid)` (excluding . /// the index `mid` itself) and the second will contain all . /// indices from `[mid, len)` (excluding the index `len` itself). . /// -- line 2070 ---------------------------------------- -- line 2110 ---------------------------------------- . . // SAFETY: Caller has to check that `0 <= mid <= self.len()`. . // . // `[ptr; mid]` and `[mid; len]` are not overlapping, so returning a mutable reference . // is fine. . unsafe { . ( . from_raw_parts_mut(ptr, mid), 315 ( 0.00%) from_raw_parts_mut(ptr.add(mid), unchecked_sub(len, mid)), . ) . } . } . . /// Divides one slice into two at an index, returning `None` if the slice is . /// too short. . /// . /// If `mid ≤ len` returns a pair of slices where the first will contain all -- line 2126 ---------------------------------------- -- 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])> { 4,521 ( 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 2194 ---------------------------------------- . /// . /// assert_eq!(None, v.split_at_mut_checked(7)); . /// ``` . #[stable(feature = "split_at_checked", since = "1.80.0")] . #[rustc_const_stable(feature = "const_slice_split_at_mut", since = "1.83.0")] . #[inline] . #[must_use] . pub const fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut [T], &mut [T])> { 1,260 ( 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_mut_unchecked(mid) }) . } else { . None . } . } . -- line 2210 ---------------------------------------- -- line 2596 ---------------------------------------- . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . #[must_use] . pub fn contains(&self, x: &T) -> bool . where . T: PartialEq, . { 120 ( 0.00%) cmp::SliceContains::slice_contains(x, self) 1,840 ( 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 (40x) . } . . /// 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(); 276,266 ( 0.01%) 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()); 121,508 ( 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 ---------------------------------------- -- line 2981 ---------------------------------------- . #[rustc_const_unstable(feature = "const_binary_search", issue = "159532")] . #[stable(feature = "rust1", since = "1.0.0")] . #[inline] . pub const fn binary_search_by<'a, F>(&'a self, mut f: F) -> Result . where . F: [const] FnMut(&'a T) -> Ordering + [const] Destruct, . { . let mut size = self.len(); 160 ( 0.00%) if size == 0 { . return Err(0); . } . let mut base = 0usize; . . // This loop intentionally doesn't have an early exit if the comparison . // returns Equal. We want the number of loop iterations to depend *only* . // on the size of the input slice so that the CPU can reliably predict . // the loop count. 960 ( 0.00%) while size > 1 { 960 ( 0.00%) let half = size / 2; 480 ( 0.00%) let mid = base + half; . . // SAFETY: the call is made safe by the following invariants: . // - `mid >= 0`: by definition . // - `mid < size`: `mid = size / 2 + size / 4 + size / 8 ...` 480 ( 0.00%) let cmp = f(unsafe { self.get_unchecked(mid) }); . . // Binary search interacts poorly with branch prediction, so force . // the compiler to use conditional moves if supported by the target . // architecture. . base = hint::select_unpredictable(cmp == Greater, base, mid); . . // This is imprecise in the case where `size` is odd and the . // comparison returns Greater: the mid element still gets included . // by `size` even though it's known to be larger than the element . // being searched for. . // . // This is fine though: we gain more performance by keeping the . // loop iteration count invariant (and thus predictable) than we . // lose from considering one additional element. 480 ( 0.00%) size -= half; . } . . // SAFETY: base is always in [0, size) because base <= mid. 40 ( 0.00%) let cmp = f(unsafe { self.get_unchecked(base) }); . if cmp == Equal { . // SAFETY: same as the `get_unchecked` above. . unsafe { hint::assert_unchecked(base < self.len()) }; . Ok(base) . } else { 40 ( 0.00%) let result = base + (cmp == Less) as usize; . // SAFETY: same as the `get_unchecked` above. . // Note that this is `<=`, unlike the assume in the `Ok` path. . unsafe { hint::assert_unchecked(result <= self.len()) }; . Err(result) . } . } . . /// Binary searches this slice with a key extraction function. -- line 3038 ---------------------------------------- -- line 3252 ---------------------------------------- . /// [total order]: https://en.wikipedia.org/wiki/Total_order . #[stable(feature = "sort_unstable", since = "1.20.0")] . #[inline] . pub fn sort_unstable_by_key(&mut self, mut f: F) . where . F: FnMut(&T) -> K, . K: Ord, . { 313 ( 0.00%) sort::unstable::sort(self, &mut |a, b| f(a).lt(&f(b))); . } . . /// Partially sorts the slice in ascending order **without** preserving the initial order of equal elements. . /// . /// Upon completion, for the specified range `start..end`, it's guaranteed that: . /// . /// 1. Every element in `self[..start]` is smaller than or equal to . /// 2. Every element in `self[start..end]`, which is sorted, and smaller than or equal to -- line 3268 ---------------------------------------- 74,121 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/single_range_in_vec_init.rs -------------------------------------------------------------------------------- Ir -- line 65 ---------------------------------------- . } else { . write!(f, "an array") . } . } . } . . impl LateLintPass<'_> for SingleRangeInVecInit { . #[expect(clippy::too_many_lines)] 559,314 ( 0.02%) 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`" 124,971 ( 0.00%) let (inner_expr, span, suggested_type) = if let ExprKind::Array([inner_expr]) = expr.kind 278 ( 0.00%) && !expr.span.from_expansion() . { 16 ( 0.00%) (inner_expr, expr.span, SuggestedType::Array) 1,537 ( 0.00%) } else if let Some(macro_call) = root_macro_call_first_node(cx, expr) 2,679 ( 0.00%) && let Some(VecArgs::Vec([expr])) = VecArgs::hir(cx, expr) 40,101 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (511x) . { . (expr, macro_call.span, SuggestedType::Vec) . } else { . return; . }; . 120 ( 0.00%) let Some(range) = Range::hir(cx, inner_expr) else { 900 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (20x) . return; . }; . . let Some(snippet) = span.get_text(cx) else { . return; . }; . // `is_from_proc_macro` will skip any `vec![]`. Let's not! . if !snippet.starts_with(suggested_type.starts_with()) || !snippet.ends_with(suggested_type.ends_with()) { -- line 99 ---------------------------------------- -- line 188 ---------------------------------------- . format!("if you wanted {suggested_type} of len {end_snippet}, try"), . format!("{start_snippet}; {end_snippet}"), . applicability, . ); . } . } . }, . ); 497,168 ( 0.01%) } . } 551 ( 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}; . 23,148 ( 0.00%) pub(super) fn check_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 16,824 ( 0.00%) let attrs = cx.tcx.hir_attrs(item.hir_id()); 156,436 ( 0.00%) => ???:::hir_attrs (2,572x) 32,666 ( 0.00%) let attr = find_attr!(cx.tcx, item.hir_id(), MustUse { span, reason } => (span, reason)); 160,169 ( 0.00%) => ???:>::get_attrs (2,572x) 7,588 ( 0.00%) if let hir::ItemKind::Fn { . ref sig, . body: ref body_id, 128 ( 0.00%) ident, . .. . } = item.kind . { 512 ( 0.00%) let is_public = cx.effective_visibilities.is_exported(item.owner_id.def_id); 6,591 ( 0.00%) => ???:::is_exported (128x) 384 ( 0.00%) let fn_header_span = item.span.with_hi(sig.decl.output.span().hi()); 256 ( 0.00%) if let Some((attr_span, reason)) = attr { . check_needless_must_use( . cx, . sig.decl, . item.owner_id, . item.span, . fn_header_span, . *attr_span, . *reason, . attrs, . sig, . ); 746 ( 0.00%) } else if is_public && !is_proc_macro(attrs) && !find_attr!(attrs, NoMangle(..)) { 91 ( 0.00%) check_must_use_candidate( 206,892 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_must_use_candidate (7x) . cx, . sig.decl, 35 ( 0.00%) cx.tcx.hir_body(*body_id), 462 ( 0.00%) => ???:::hir_body (7x) . item.span, . ident.span, . item.owner_id, . "this function could have a `#[must_use]` attribute", . ); . } . } 20,576 ( 0.00%) } . . pub(super) fn check_impl_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'_>) { 7,509 ( 0.00%) if let hir::ImplItemKind::Fn(ref sig, ref body_id) = item.kind { 9,608 ( 0.00%) let is_public = cx.effective_visibilities.is_exported(item.owner_id.def_id); 130,344 ( 0.00%) => ???:::is_exported (2,402x) 4,804 ( 0.00%) let fn_header_span = item.span.with_hi(sig.decl.output.span().hi()); 21,618 ( 0.00%) let attrs = cx.tcx.hir_attrs(item.hir_id()); 155,850 ( 0.00%) => ???:::hir_attrs (2,402x) 46,956 ( 0.00%) let attr = find_attr!(cx.tcx, item.hir_id(), MustUse { span, reason } => (span, reason)); 160,096 ( 0.00%) => ???:>::get_attrs (2,402x) . 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, . ); 16,802 ( 0.00%) } else if is_public && !is_proc_macro(attrs) && trait_ref_of_method(cx, item.owner_id).is_none() { 178,624 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::trait_ref_of_method (1,198x) 9,698 ( 0.00%) check_must_use_candidate( 17,624,641 ( 0.49%) => site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_must_use_candidate (746x) . cx, . sig.decl, 2,984 ( 0.00%) cx.tcx.hir_body(*body_id), 47,594 ( 0.00%) => ???:::hir_body (746x) . item.span, 1,492 ( 0.00%) item.ident.span, . item.owner_id, . "this method could have a `#[must_use]` attribute", . ); . } . } 2,503 ( 0.00%) } . . pub(super) fn check_trait_item<'tcx>(cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) { 210 ( 0.00%) if let hir::TraitItemKind::Fn(ref sig, ref eid) = item.kind { 280 ( 0.00%) let is_public = cx.effective_visibilities.is_exported(item.owner_id.def_id); 3,990 ( 0.00%) => ???:::is_exported (70x) 140 ( 0.00%) let fn_header_span = item.span.with_hi(sig.decl.output.span().hi()); . 630 ( 0.00%) let attrs = cx.tcx.hir_attrs(item.hir_id()); 4,298 ( 0.00%) => ???:::hir_attrs (70x) 3,424 ( 0.00%) let attr = find_attr!(cx.tcx, item.hir_id(), MustUse { span, reason } => (span, reason)); 4,405 ( 0.00%) => ???:>::get_attrs (70x) . 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, . ); 304 ( 0.00%) } else if let hir::TraitFn::Provided(eid) = *eid { 24 ( 0.00%) let body = cx.tcx.hir_body(eid); 850 ( 0.00%) => ???:::hir_body (12x) 24 ( 0.00%) if attr.is_none() && is_public && !is_proc_macro(attrs) { 130 ( 0.00%) check_must_use_candidate( 5,100 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_must_use_candidate (10x) . cx, . sig.decl, . body, . item.span, 20 ( 0.00%) item.ident.span, . item.owner_id, . "this method could have a `#[must_use]` attribute", . ); . } . } . } 70 ( 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"); . }, . ); . } . } . 10,682 ( 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, . ) { 2,289 ( 0.00%) if has_mutable_arg(cx, body) 1,539 ( 0.00%) || mutates_static(cx, body) 2,024 ( 0.00%) || item_span.in_external_macro(cx.sess().source_map()) 3 ( 0.00%) || returns_unit(decl) 2,525 ( 0.00%) || !cx.effective_visibilities.is_exported(item_id.def_id) 28,785 ( 0.00%) => ???:::is_exported (505x) 4,040 ( 0.00%) || opt_must_use_path(cx, return_ty(cx, item_id)).is_some() 3,830,886 ( 0.11%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::opt_must_use_path (505x) 97,227 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::return_ty (505x) . || item_span.from_expansion() 2,640 ( 0.00%) || is_entrypoint_fn(cx, item_id.def_id.to_def_id()) 28,160 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_entrypoint_fn (440x) . { . return; . } 4,840 ( 0.00%) span_lint_and_then(cx, MUST_USE_CANDIDATE, ident_span, msg, |diag| { 500,622 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (440x) . 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, . ); . }); 6,104 ( 0.00%) } . . fn returns_unit(decl: &hir::FnDecl<'_>) -> bool { . match decl.output { . hir::FnRetTy::DefaultReturn(_) => true, 2,525 ( 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 { 1,942 ( 0.00%) if let hir::PatKind::Wild = pat.kind { . return false; // ignore `_` patterns . } 5,826 ( 0.00%) if cx.tcx.has_typeck_results(pat.hir_id.owner.def_id) { 225,242 ( 0.01%) => ???:::has_typeck_results (971x) 8,739 ( 0.00%) is_mutable_ty(cx, cx.tcx.typeck(pat.hir_id.owner.def_id).pat_ty(pat), tys) 6,544,362 ( 0.18%) => site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::is_mutable_ty (971x) 136,085 ( 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:: (971x) 38,840 ( 0.00%) => ???:::pat_ty (971x) . } else { . false . } . } . 22,140 ( 0.00%) fn is_mutable_ty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, tys: &mut DefIdSet) -> bool { 19,027 ( 0.00%) match *ty.kind() { . // primitive types are never mutable . ty::Bool | ty::Char | ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::Str => false, 2,936 ( 0.00%) ty::Adt(adt, args) => { 14,648 ( 0.00%) tys.insert(adt.did()) && !ty.is_freeze(cx.tcx, cx.typing_env()) 11,302,574 ( 0.31%) => ???:::is_freeze (1,452x) 30,492 ( 0.00%) => ???:::typing_env (1,452x) 6,875 ( 0.00%) || matches!(cx.tcx.get_diagnostic_name(adt.did()), Some(sym::Rc | sym::Arc)) 84,897 ( 0.00%) => ???:::get_diagnostic_name (1,363x) 51 ( 0.00%) && args.types().any(|ty| is_mutable_ty(cx, ty, tys)) 53,758 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::is_mutable_ty'2 (17x) . }, 29 ( 0.00%) ty::Tuple(args) => args.iter().any(|ty| is_mutable_ty(cx, ty, tys)), 7,758 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::is_mutable_ty'2 (8x) 144 ( 0.00%) ty::Array(ty, _) | ty::Slice(ty) => is_mutable_ty(cx, ty, tys), 3,754 ( 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, . } 17,712 ( 0.00%) } . . fn is_mutated_static(e: &hir::Expr<'_>) -> bool { . use hir::ExprKind::{Field, Index, Path}; . 1,457 ( 0.00%) match e.kind { 206 ( 0.00%) Path(QPath::Resolved(_, path)) => !matches!(path.res, Res::Local(_)), . Path(_) => true, 15 ( 0.00%) 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}; . 34,283 ( 0.00%) match e.kind { 1,545 ( 0.00%) Call(_, args) => { . let mut tys = DefIdSet::default(); . for arg in args { 2,185 ( 0.00%) if cx.tcx.has_typeck_results(arg.hir_id.owner.def_id) 101,098 ( 0.00%) => ???:::has_typeck_results (437x) 5,244 ( 0.00%) && is_mutable_ty(cx, cx.tcx.typeck(arg.hir_id.owner.def_id).expr_ty(arg), &mut tys) 2,230,734 ( 0.06%) => site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::is_mutable_ty (437x) 61,091 ( 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:: (437x) 17,564 ( 0.00%) => ???:::expr_ty (437x) . && is_mutated_static(arg) . { . return ControlFlow::Break(()); . } . tys.clear(); . } . ControlFlow::Continue(()) . }, 2,088 ( 0.00%) MethodCall(_, receiver, args, _) => { . let mut tys = DefIdSet::default(); . for arg in std::iter::once(receiver).chain(args.iter()) { 3,905 ( 0.00%) if cx.tcx.has_typeck_results(arg.hir_id.owner.def_id) 180,808 ( 0.00%) => ???:::has_typeck_results (781x) 10,091 ( 0.00%) && is_mutable_ty(cx, cx.tcx.typeck(arg.hir_id.owner.def_id).expr_ty(arg), &mut tys) 3,092,525 ( 0.09%) => site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::is_mutable_ty (781x) 109,255 ( 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:: (781x) 31,264 ( 0.00%) => ???:::expr_ty (781x) 15 ( 0.00%) && is_mutated_static(arg) . { . return ControlFlow::Break(()); . } . tys.clear(); . } . ControlFlow::Continue(()) 515 ( 0.00%) }, 9 ( 0.00%) Assign(target, ..) | AssignOp(_, target, _) | AddrOf(_, hir::Mutability::Mut, target) 229 ( 0.00%) if is_mutated_static(target) => . { . ControlFlow::Break(()) . }, . _ => ControlFlow::Continue(()), . } . }) . .is_some() . } -- line 334 ---------------------------------------- 74,076 ( 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}; . 15,210 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'_>, . cmp_op: BinOpKind, . lhs: &'tcx Expr<'_>, . rhs: &'tcx Expr<'_>, . ) { 1,468 ( 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(); 2,202 ( 0.00%) let ecx = ConstEvalCtxt::new(cx); 41,104 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (734x) 734 ( 0.00%) let ctxt = e.span.ctxt(); 242 ( 0.00%) let Some((cmp_op, bit_op, bit_lhs, bit_rhs, cmp_val)) = try_maybe_swap( . lhs, . rhs, 14,526 ( 0.00%) |lhs, rhs| { 2,933 ( 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) 88 ( 0.00%) && matches!(typeck.expr_ty(rhs).peel_refs().kind(), ty::Uint(_) | ty::Int(_)) 880 ( 0.00%) => ???:::expr_ty (22x) 44 ( 0.00%) && bit_sp.ctxt() == ctxt 242 ( 0.00%) && let Some(Constant::Int(cmp_val)) = ecx.eval(rhs) 3,036 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (22x) 110 ( 0.00%) && walk_span_to_context(rhs.span, ctxt).is_some() 1,892 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::walk_span_to_context (22x) . { 198 ( 0.00%) Some((cmp_op, bit_op, bit_lhs, bit_rhs, cmp_val)) . } else { 1,424 ( 0.00%) None . } 11,568 ( 0.00%) }, . |r| (r.0.swap_operands(), r.1, r.2, r.3, r.4), . ) else { . return; . }; . 154 ( 0.00%) if !ctxt.in_external_macro(cx.tcx.sess.source_map()) 2,222 ( 0.00%) => ???:::in_external_macro (22x) 88 ( 0.00%) && let ty = typeck.expr_ty(bit_lhs).peel_refs() 880 ( 0.00%) => ???:::expr_ty (22x) . && matches!(ty.kind(), ty::Uint(_) | ty::Int(_)) 66 ( 0.00%) && matches!(typeck.expr_ty(bit_rhs).peel_refs().kind(), ty::Uint(_) | ty::Int(_)) 880 ( 0.00%) => ???:::expr_ty (22x) 152 ( 0.00%) && let Some(Constant::Int(op_val)) = try_maybe_swap( . bit_lhs, . bit_rhs, 122 ( 0.00%) |_, e| ecx.eval(e).filter(|_| walk_span_to_context(e.span, ctxt).is_some()), 13,010 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (28x) 1,634 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/source.rs:clippy_utils::source::walk_span_to_context (19x) . identity, . ) . { 190 ( 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 { 56 ( 0.00%) match cmp_op.kind { . CmpOpKind::Eq => { 50 ( 0.00%) let help_msg = match bit_op { 60 ( 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 85 ---------------------------------------- . ), . BitOp::Xor | BitOp::Or if u128::MAX.wrapping_shl(cmp_val.trailing_zeros()) & op_val == 0 => ( . INEFFECTIVE_BIT_MASK, . LintMsg::Ineffective, . NoteMsg::OpBitsInTrailingZeros, . ), . _ => return, . }, 81 ( 0.00%) CmpOpKind::Gt if matches!(ty.kind(), ty::Uint(_)) => match bit_op { 27 ( 0.00%) BitOp::And if op_val <= cmp_val => { . (BAD_BIT_MASK, LintMsg::from_cmp_result(!cmp_op.negate), NoteMsg::OpLe) . }, . BitOp::Or if op_val > cmp_val => { . (BAD_BIT_MASK, LintMsg::from_cmp_result(cmp_op.negate), NoteMsg::OpGt) . }, . BitOp::Xor | BitOp::Or if u128::MAX.unbounded_shl(cmp_val.trailing_ones()) & op_val == 0 => ( . INEFFECTIVE_BIT_MASK, . LintMsg::Ineffective, -- line 102 ---------------------------------------- -- 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)); . }); . } . } 13,520 ( 0.00%) } . . fn try_maybe_swap( . lhs: &T, . rhs: &T, . mut f: impl FnMut(&T, &T) -> Option, . inv: impl FnOnce(R) -> R, . ) -> Option { 4,452 ( 0.00%) if let Some(x) = f(lhs, rhs) { 21,068 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/bit_mask.rs:clippy_lints::operators::bit_mask::check::{closure#0} (734x) . Some(x) . } else { 2,136 ( 0.00%) f(rhs, lhs).map(inv) 12,824 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/operators/bit_mask.rs:clippy_lints::operators::bit_mask::check::{closure#0} (712x) . } . } . . #[derive(Clone, Copy)] . struct CmpOp { . pub kind: CmpOpKind, . pub negate: bool, . } . impl CmpOp { . fn from_bin_op(op: BinOpKind) -> Option { 8,740 ( 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 { 123 ( 0.00%) match op { . BinOpKind::BitXor => Some(Self::Xor), . BinOpKind::BitAnd => Some(Self::And), . BinOpKind::BitOr => Some(Self::Or), . _ => None, . } . } . } . -- line 217 ---------------------------------------- 6,856 ( 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 { 851,932 ( 0.02%) 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. 318,719 ( 0.01%) 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`. 20,898 ( 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`. 57,541 ( 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`. 97,983 ( 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`. 308,545 ( 0.01%) unsafe { intrinsics::offset(self, count) } . } . . /// Adds an unsigned offset in bytes to a pointer. . /// . /// `count` is in units of bytes. . /// . /// This is purely a convenience for casting to a `u8` pointer and . /// using [add][pointer::add] on it. See that method for documentation -- line 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 { 96,675 ( 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 ---------------------------------------- 46,470 ( 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 { 497,168 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { 124,850 ( 0.00%) if let hir::ExprKind::Closure(hir::Closure { . kind: hir::ClosureKind::Coroutine(hir::CoroutineKind::Desugared(hir::CoroutineDesugaring::Async, _)), . def_id, . .. 279 ( 0.00%) }) = expr.kind . && let Some(coroutine_layout) = cx.tcx.mir_coroutine_witnesses(*def_id) . { . self.check_interior_types(cx, coroutine_layout); . } 497,168 ( 0.01%) } . } . . impl AwaitHolding { . fn check_interior_types(&self, cx: &LateContext<'_>, coroutine: &CoroutineLayout<'_>) { . for (ty_index, ty_cause) in coroutine.field_tys.iter_enumerated() { . if let rustc_middle::ty::Adt(adt, _) = ty_cause.ty.kind() { . let await_points = || { . coroutine -- line 218 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/misc_early/redundant_at_rest_pattern.rs -------------------------------------------------------------------------------- Ir . use clippy_utils::diagnostics::span_lint_and_sugg; . use rustc_ast::{Pat, PatKind}; . use rustc_errors::Applicability; . use rustc_lint::{EarlyContext, LintContext as _}; . . use super::REDUNDANT_AT_REST_PATTERN; . . pub(super) fn check(cx: &EarlyContext<'_>, pat: &Pat) { 19,138 ( 0.00%) if let PatKind::Slice(slice) = &pat.kind . && let [one] = &**slice . && let PatKind::Ident(annotation, ident, Some(rest)) = &one.kind . && let PatKind::Rest = rest.kind . && !pat.span.in_external_macro(cx.sess().source_map()) . { . span_lint_and_sugg( . cx, . REDUNDANT_AT_REST_PATTERN, . pat.span, . "using a rest pattern to bind an entire slice to a local", . "this is better represented with just the binding", . format!("{}{ident}", annotation.prefix_str()), . Applicability::MachineApplicable, . ); . } 9,569 ( 0.00%) } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/impl_trait_in_params.rs -------------------------------------------------------------------------------- Ir -- line 6 ---------------------------------------- . use rustc_hir::intravisit::FnKind; . use rustc_hir::{Body, GenericParam, Generics, HirId, ImplItem, ImplItemKind, TraitItem, TraitItemKind}; . use rustc_lint::LateContext; . . use super::IMPL_TRAIT_IN_PARAMS; . . fn report(cx: &LateContext<'_>, param: &GenericParam<'_>, generics: &Generics<'_>) { . // No generics with nested generics, and no generics like FnMut(x) 36 ( 0.00%) span_lint_and_then( 4,060 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (4x) . cx, . IMPL_TRAIT_IN_PARAMS, 4 ( 0.00%) param.span, . "`impl Trait` used as a function parameter", . |diag| { . if let Some(gen_span) = generics.span_for_param_suggestion() { . // If there's already a generic param with the same bound, do not lint **this** suggestion. . diag.span_suggestion_verbose( . gen_span, . "add a type parameter", . format!(", {{ /* Generic name */ }}: {}", ¶m.name.ident().as_str()[5..]), -- line 25 ---------------------------------------- -- line 33 ---------------------------------------- . Applicability::HasPlaceholders, . ); . } . }, . ); . } . . pub(super) fn check_fn<'tcx>(cx: &LateContext<'_>, kind: &'tcx FnKind<'_>, body: &'tcx Body<'_>, hir_id: HirId) { 5,642 ( 0.00%) if let FnKind::ItemFn(_, generics, _) = kind 384 ( 0.00%) && cx.tcx.visibility(cx.tcx.hir_body_owner_def_id(body.id())).is_public() 16,404 ( 0.00%) => ???:::hir_body_owner_def_id (128x) 30 ( 0.00%) && !is_in_test(cx.tcx, hir_id) 80,391 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_test (10x) . { 10 ( 0.00%) for param in generics.params { 18 ( 0.00%) if param.is_impl_trait() { 4 ( 0.00%) report(cx, param, generics); . } . } . } . } . . pub(super) fn check_impl_item(cx: &LateContext<'_>, impl_item: &ImplItem<'_>) { 9,810 ( 0.00%) if let ImplItemKind::Fn(_, body_id) = impl_item.kind 19,216 ( 0.00%) && let hir::Node::Item(item) = cx.tcx.parent_hir_node(impl_item.hir_id()) 309,022 ( 0.01%) => ???:::parent_hir_node (2,402x) 4,804 ( 0.00%) && let hir::ItemKind::Impl(impl_) = item.kind 4,804 ( 0.00%) && let hir::Impl { of_trait: None, .. } = impl_ 6,136 ( 0.00%) && let body = cx.tcx.hir_body(body_id) 98,700 ( 0.00%) => ???:::hir_body (1,534x) 4,602 ( 0.00%) && cx.tcx.visibility(cx.tcx.hir_body_owner_def_id(body.id())).is_public() 189,388 ( 0.01%) => ???:::hir_body_owner_def_id (1,534x) 4,716 ( 0.00%) && !is_in_test(cx.tcx, impl_item.hir_id()) 1,700,383 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_test (786x) . { 1,572 ( 0.00%) for param in impl_item.generics.params { 146 ( 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) { 140 ( 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 ---------------------------------------- 2,989 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/x86/sse2.rs -------------------------------------------------------------------------------- Ir -- line 887 ---------------------------------------- . /// . /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_or_si128) . #[inline] . #[target_feature(enable = "sse2")] . #[cfg_attr(test, assert_instr(orps))] . #[stable(feature = "simd_x86", since = "1.27.0")] . #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] . pub const fn _mm_or_si128(a: __m128i, b: __m128i) -> __m128i { 81 ( 0.00%) unsafe { simd_or(a, b) } . } . . /// Computes the bitwise XOR of 128 bits (representing integer data) in `a` and . /// `b`. . /// . /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_xor_si128) . #[inline] . #[target_feature(enable = "sse2")] -- line 903 ---------------------------------------- -- line 912 ---------------------------------------- . /// . /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_cmpeq_epi8) . #[inline] . #[target_feature(enable = "sse2")] . #[cfg_attr(test, assert_instr(pcmpeqb))] . #[stable(feature = "simd_x86", since = "1.27.0")] . #[rustc_const_unstable(feature = "stdarch_const_x86", issue = "149298")] . pub const fn _mm_cmpeq_epi8(a: __m128i, b: __m128i) -> __m128i { 6,067 ( 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); 385,923 ( 0.01%) simd_bitmask::<_, u16>(m) as u32 as i32 . } . } . . /// Shuffles 32-bit integers in `a` using the control in `IMM8`. . /// . /// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm_shuffle_epi32) . #[inline] . #[target_feature(enable = "sse2")] -- line 1629 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/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 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 131,052 ( 0.00%) if let ExprKind::Binary(op, lhs, rhs) = expr.kind 4,860 ( 0.00%) && let (lt, gt) = match op.node { . BinOpKind::Lt => (lhs, rhs), . BinOpKind::Gt => (rhs, lhs), . _ => return, . } 210 ( 0.00%) && let ctxt = expr.span.ctxt() 838 ( 0.00%) && let (op_lhs, op_rhs, other, commutative) = match (<.kind, >.kind) { 3 ( 0.00%) (&ExprKind::Binary(op, lhs, rhs), _) if op.node == BinOpKind::Add && ctxt == lt.span.ctxt() => { . (lhs, rhs, gt, true) . }, 13 ( 0.00%) (_, &ExprKind::Binary(op, lhs, rhs)) if op.node == BinOpKind::Sub && ctxt == gt.span.ctxt() => { . (lhs, rhs, lt, false) . }, . _ => return, . } . && let typeck = cx.typeck_results() 3 ( 0.00%) && let ty = typeck.expr_ty(op_lhs) 40 ( 0.00%) => ???:::expr_ty (1x) 2 ( 0.00%) && matches!(ty.kind(), ty::Uint(_)) 4 ( 0.00%) && ty == typeck.expr_ty(op_rhs) 40 ( 0.00%) => ???:::expr_ty (1x) 5 ( 0.00%) && ty == typeck.expr_ty(other) 40 ( 0.00%) => ???:::expr_ty (1x) 6 ( 0.00%) && !expr.span.in_external_macro(cx.tcx.sess.source_map()) 117 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/lib.rs:::in_external_macro (1x) 16 ( 0.00%) && (eq_expr_value(cx, ctxt, op_lhs, other) || (commutative && eq_expr_value(cx, ctxt, op_rhs, other))) 1,190 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:clippy_utils::hir_utils::eq_expr_value (2x) . { . span_lint( . cx, . PANICKING_OVERFLOW_CHECKS, . expr.span, . "you are trying to use classic C overflow conditions that will fail in Rust", . ); . } 497,168 ( 0.01%) } . } 1,274 ( 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(); 110,498 ( 0.00%) 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::>(); . 352,335 ( 0.01%) unsafe { f(Some(downcast(context))) } 8,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/dep_graph/mod.rs:rustc_middle::dep_graph::read_deps::<::read_index::{closure#0}>::{closure#0} (447x) . } . } . . /// Allows access to the current `ImplicitCtxt`. . /// Panics if there is no `ImplicitCtxt` available. . #[inline] . pub fn with_context(f: F) -> R . where -- line 83 ---------------------------------------- 118,939 ( 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)] 497,168 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // Skip path expressions from deref calls. e.g. `Deref::deref(e)` 124,292 ( 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 124,292 ( 0.00%) if expr.span.from_expansion() { 38,072 ( 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 86,587 ( 0.00%) if let Some((state, data)) = self.state.take() { 487 ( 0.00%) self.report(cx, expr, state, data, typeck); . } . return; . }; 1,034 ( 0.00%) self.skip_expr = skip_expr; . 2,068 ( 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; . } . 2,368 ( 0.00%) match (self.state.take(), kind) { . (None, kind) => { 4,076 ( 0.00%) let expr_ty = typeck.expr_ty(expr); 40,820 ( 0.00%) => ???:::expr_ty (1,019x) 5,095 ( 0.00%) let use_site = get_expr_use_site(cx.tcx, typeck, SyntaxContext::root(), expr); 348,649 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_expr_use_site (1,019x) 6,341 ( 0.00%) let adjusted_ty = use_site.adjustments.last().map_or(expr_ty, |a| a.target); . 11,209 ( 0.00%) match kind { 484 ( 0.00%) RefOp::Deref if use_site.same_ctxt => { 237 ( 0.00%) let use_node = use_site.use_node(cx); 7,022 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:::use_node (237x) 711 ( 0.00%) let sub_ty = typeck.expr_ty(sub_expr); 9,480 ( 0.00%) => ???:::expr_ty (237x) 1,422 ( 0.00%) if let ExprUseNode::FieldAccess(name) = use_node . && !use_site.moved_before_use . && !ty_contains_field(sub_ty, name.name) . { . self.state = Some(( . State::ExplicitDerefField { . name: name.name, . derefs_manually_drop: is_manually_drop(sub_ty), . }, . StateData { . first_expr: expr, . adjusted_ty, . }, . )); 237 ( 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() 621 ( 0.00%) && let Some(ty) = use_node.defined_ty(cx) 21,942 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:::defined_ty (207x) 106 ( 0.00%) && TyCoercionStability::for_defined_ty(cx, ty, use_node.is_return()).is_deref_stable() 2,756 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::for_defined_ty (53x) . { . self.state = Some(( . State::ExplicitDeref { mutability: None }, . StateData { . first_expr: expr, . adjusted_ty, . }, . )); -- line 315 ---------------------------------------- -- line 328 ---------------------------------------- . mutbl, . }, . StateData { . first_expr: expr, . adjusted_ty, . }, . )); . }, 1,554 ( 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) => { 6,683 ( 0.00%) if !matches!(adjust.kind, Adjust::Deref(_)) { . break Some(adjust); 1,552 ( 0.00%) } else if !adjust.target.is_ref() { . deref_count += 1; . break iter.next(); . } . deref_count += 1; . }, . None => break None, . } . }; . 4,632 ( 0.00%) let use_node = use_site.use_node(cx); 33,053 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:::use_node (772x) 3,088 ( 0.00%) let stability = use_node.defined_ty(cx).map_or(TyCoercionStability::None, |ty| { 260,209 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:::defined_ty (772x) 1,274 ( 0.00%) TyCoercionStability::for_defined_ty(cx, ty, use_node.is_return()) 2,132,948 ( 0.06%) => site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::for_defined_ty (637x) . }); 10,660 ( 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 . // deref through `ManuallyDrop<_>` will not compile. . !adjust_derefs_manually_drop(use_site.adjustments, expr_ty) . }, . ExprUseNode::Callee | ExprUseNode::FieldAccess(_) if !use_site.moved_before_use => true, 4 ( 0.00%) ExprUseNode::MethodArg(hir_id, _, 0) if !use_site.moved_before_use => { . // Check for calls to trait methods where auto-borrow will not resolve. . // Three cases need to be handled: . // * `self` methods on `&T` will never have auto-borrow . // * `&self` methods on `&T` can have auto-borrow, but `&self` methods on `T` will take . // priority. . // * `&self` methods on `T` can have auto-borrow, but if there's another method with the . // same name, it may take priority. 40 ( 0.00%) if let Some(fn_id) = typeck.type_dependent_def_id(hir_id) 204 ( 0.00%) => ???:::type_dependent_def_id (4x) 28 ( 0.00%) && let Some(trait_id) = cx.tcx.trait_of_assoc(fn_id) 552 ( 0.00%) => ???:::trait_of_assoc (4x) . && let arg_ty = cx.tcx.erase_and_anonymize_regions(adjusted_ty) 12 ( 0.00%) && let ty::Ref(_, sub_ty, _) = *arg_ty.kind() . && let args = 20 ( 0.00%) typeck.node_args_opt(hir_id).map(|args| &args[1..]).unwrap_or_default() 156 ( 0.00%) => ???:::node_args_opt (4x) 20 ( 0.00%) && let impl_ty = if cx . .tcx . .fn_sig(fn_id) . .instantiate_identity() . .skip_norm_wip() . .skip_binder() . .inputs()[0] . .is_ref() . { . // Trait methods taking `&self` . sub_ty . } else { . // Trait methods taking `self` . arg_ty . } 20 ( 0.00%) && let method_name = cx.tcx.item_name(fn_id) 284 ( 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:::item_name:: (4x) . && ( . // If this trait impl is implemented on `&T`, then auto-borrowing won't work 4 ( 0.00%) (impl_ty.is_ref() . && implements_trait( . cx, . impl_ty, . trait_id, . &args[..cx.tcx.generics_of(trait_id).own_params.len() - 1], . )) . // If there's an inherent method, or a method from another trait, . // with the same name that's also implemented on this same type, . // then removing the borrow might cause that method to be chosen . // instead of the current one. 16 ( 0.00%) || get_adt_inherent_method(cx, impl_ty, method_name).is_some() 76 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::get_adt_inherent_method (4x) 80 ( 0.00%) || cx.tcx.in_scope_traits(hir_id).is_some_and(|traits| { 332 ( 0.00%) => ???:::in_scope_traits (4x) . traits . .iter() 16 ( 0.00%) .filter(|trait_| { 9 ( 0.00%) cx.tcx 63 ( 0.00%) .non_blanket_impls_for_ty(trait_.def_id, impl_ty) 14,590 ( 0.00%) => ???:::non_blanket_impls_for_ty (9x) . .next() . .is_some() 9 ( 0.00%) || !cx . .tcx . .trait_impls_of(trait_.def_id) . .blanket_impls() . .is_empty() . }) . .any(|trait_| { . cx.tcx . .associated_items(trait_.def_id) . .filter_by_name_unhygienic(method_name) . .any(|item| item.tag() == AssocTag::Fn && item.def_id != fn_id) . }) 32 ( 0.00%) }) . ) . { . false . } else { . true . } . }, . _ => false, -- line 444 ---------------------------------------- -- line 466 ---------------------------------------- . // let x = match x { . // // Removing the borrow will cause `x` to be moved . // Some(x) => &mut *x, . // None => y . // }; . // } . // ``` . let (required_refs, msg) = if can_auto_borrow { 36 ( 0.00%) (1, if deref_count == 1 { borrow_msg } else { deref_msg }) 4,245 ( 0.00%) } else if let Some(&Adjustment { . kind: Adjust::Borrow(AutoBorrow::Ref(mutability)), . .. 768 ( 0.00%) }) = next_adjust 5,432 ( 0.00%) && matches!(mutability, AutoBorrowMutability::Mut { .. }) . && !stability.is_reborrow_stable() . { . (3, deref_msg) . } else { . (2, deref_msg) . }; . 1,544 ( 0.00%) if deref_count >= required_refs { 290 ( 0.00%) 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, 406 ( 0.00%) for_field_access: if let ExprUseNode::FieldAccess(name) = use_node . && !use_site.moved_before_use . { . Some(name.name) . } else { . None . }, . }), . StateData { . first_expr: expr, . adjusted_ty, . }, . )); 714 ( 0.00%) } else if stability.is_deref_stable() . // Auto-deref doesn't combine with other adjustments 3,736 ( 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(_))) . { 1,299 ( 0.00%) self.state = Some(( . State::Borrow { mutability }, . StateData { . first_expr: expr, . adjusted_ty, . }, . )); . } . }, -- line 521 ---------------------------------------- -- line 549 ---------------------------------------- . (Some((State::DerefedBorrow(state), data)), RefOp::AddrOf(_)) if state.count != 0 => { . self.state = Some(( . State::DerefedBorrow(DerefedBorrow { . count: state.count - 1, . ..state . }), . data, . )); 2 ( 0.00%) }, . (Some((State::DerefedBorrow(state), data)), RefOp::AddrOf(mutability)) => { . let adjusted_ty = data.adjusted_ty; . let stability = state.stability; . self.report(cx, expr, State::DerefedBorrow(state), data, typeck); . if stability.is_deref_stable() { . self.state = Some(( . State::Borrow { mutability }, . StateData { -- line 565 ---------------------------------------- -- line 568 ---------------------------------------- . }, . )); . } . }, . (Some((State::DerefedBorrow(state), data)), RefOp::Deref) => { . let adjusted_ty = data.adjusted_ty; . let stability = state.stability; . let for_field_access = state.for_field_access; 68 ( 0.00%) self.report(cx, expr, State::DerefedBorrow(state), data, typeck); 796,770 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/dereference.rs:::report (4x) 8 ( 0.00%) if let Some(name) = for_field_access . && let sub_expr_ty = typeck.expr_ty(sub_expr) . && !ty_contains_field(sub_expr_ty, name) . { . self.state = Some(( . State::ExplicitDerefField { . name, . derefs_manually_drop: is_manually_drop(sub_expr_ty), . }, . StateData { . first_expr: expr, . adjusted_ty, . }, . )); 4 ( 0.00%) } else if stability.is_deref_stable() . && let Some(parent) = get_parent_expr(cx, expr) . { . self.state = Some(( . State::ExplicitDeref { mutability: None }, . StateData { . first_expr: parent, . adjusted_ty, . }, . )); . } . }, . . (Some((State::Borrow { mutability }, data)), RefOp::Deref) => { 36 ( 0.00%) if typeck.expr_ty(sub_expr).is_ref() { 360 ( 0.00%) => ???:::expr_ty (9x) . self.state = Some((State::Reborrow { mutability }, data)); . } else { 18 ( 0.00%) self.state = Some(( . State::ExplicitDeref { . mutability: Some(mutability), . }, . data, . )); . } . }, . (Some((State::Reborrow { mutability }, data)), RefOp::Deref) => { -- line 616 ---------------------------------------- -- line 617 ---------------------------------------- . self.state = Some(( . State::ExplicitDeref { . mutability: Some(mutability), . }, . data, . )); . }, . (state @ Some((State::ExplicitDeref { .. }, _)), RefOp::Deref) => { 2 ( 0.00%) self.state = state; . }, . ( . Some(( . State::ExplicitDerefField { . name, . derefs_manually_drop, . }, . data, -- line 633 ---------------------------------------- -- 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), . } 497,168 ( 0.01%) } . 90,069 ( 0.00%) fn check_pat(&mut self, cx: &LateContext<'tcx>, pat: &'tcx Pat<'_>) { 54,621 ( 0.00%) if let PatKind::Binding(BindingMode::REF, id, name, _) = pat.kind { 315 ( 0.00%) if let Some(opt_prev_pat) = self.ref_locals.get_mut(&id) { 1,434 ( 0.00%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::get_mut:: (105x) . // 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); . prev_pat.replacements.push(( -- line 662 ---------------------------------------- -- line 665 ---------------------------------------- . .0 . .into(), . )); . } . } . return; . } . 210 ( 0.00%) if !pat.span.from_expansion() 525 ( 0.00%) && let ty::Ref(_, tam, _) = *cx.typeck_results().pat_ty(pat).kind() 4,200 ( 0.00%) => ???:::pat_ty (105x) . // only lint immutable refs, because borrowed `&mut T` cannot be moved out 242 ( 0.00%) && let ty::Ref(_, _, Mutability::Not) = *tam.kind() . { 16 ( 0.00%) let mut app = Applicability::MachineApplicable; 16 ( 0.00%) let snip = snippet_with_context(cx, name.span, pat.span.ctxt(), "..", &mut app).0; 53 ( 0.00%) self.current_body = self.current_body.or(cx.enclosing_body); . self.ref_locals.insert( . id, 208 ( 0.00%) Some(RefPat { . always_deref: true, 16 ( 0.00%) spans: vec![pat.span], 32 ( 0.00%) app, 192 ( 0.00%) replacements: vec![(pat.span, snip.into())], 16 ( 0.00%) hir_id: pat.hir_id, . }), . ); . } . } 102,936 ( 0.00%) } . 20,678 ( 0.00%) fn check_body_post(&mut self, cx: &LateContext<'tcx>, body: &Body<'_>) { . if Some(body.id()) == self.current_body { 128 ( 0.00%) for pat in self.ref_locals.drain(..).filter_map(|(_, x)| x) { . let replacements = pat.replacements; 32 ( 0.00%) let app = pat.app; 32 ( 0.00%) let lint = if pat.always_deref { . NEEDLESS_BORROW . } else { . REF_BINDING_TO_REFERENCE . }; . span_lint_hir_and_then( . cx, 16 ( 0.00%) lint, . pat.hir_id, . pat.spans, . "this pattern creates a reference to a reference", . |diag| { . diag.multipart_suggestion("try", replacements, app); . }, . ); . } 11 ( 0.00%) self.current_body = None; . } 23,632 ( 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 6,826 ( 0.00%) if !self.in_deref_impl() && is_deref_or_derefmut_impl(cx, item) { 6 ( 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) { 3 ( 0.00%) self.outermost_deref_impl = None; . } . } . } . . fn is_deref_or_derefmut_impl(cx: &LateContext<'_>, item: &Item<'_>) -> bool { 10,288 ( 0.00%) if let hir::ItemKind::Impl(impl_) = item.kind . && let Some(of_trait) = impl_.of_trait 2,523 ( 0.00%) && let Some(trait_id) = of_trait.trait_ref.trait_def_id() 10,933 ( 0.00%) => ???:::trait_def_id (841x) . { 3,362 ( 0.00%) cx.tcx.lang_items().deref_trait() == Some(trait_id) || cx.tcx.lang_items().deref_mut_trait() == Some(trait_id) 67,200 ( 0.00%) => ???:::lang_items (1,680x) . } else { . false . } . } . . fn try_parse_ref_op<'tcx>( . tcx: TyCtxt<'tcx>, . typeck: &'tcx TypeckResults<'_>, . expr: &'tcx Expr<'_>, . ) -> Option<(RefOp, &'tcx Expr<'tcx>, Option)> { 269,728 ( 0.01%) let (call_path_id, def_id, arg) = match expr.kind { 49,442 ( 0.00%) ExprKind::MethodCall(_, arg, [], _) => (None, typeck.type_dependent_def_id(expr.hir_id)?, arg), 188,776 ( 0.01%) => ???:::type_dependent_def_id (3,692x) . ExprKind::Call( . &Expr { 1,273 ( 0.00%) kind: ExprKind::Path(QPath::Resolved(None, path)), 1,178 ( 0.00%) hir_id, . .. . }, 6,684 ( 0.00%) [arg], . ) => (Some(hir_id), path.res.opt_def_id()?, arg), 2,353 ( 0.00%) ExprKind::Unary(UnOp::Deref, sub_expr) if !typeck.expr_ty(sub_expr).is_raw_ptr() => { 10,480 ( 0.00%) => ???:::expr_ty (262x) . return Some((RefOp::Deref, sub_expr, None)); . }, . ExprKind::AddrOf(BorrowKind::Ref, mutability, sub_expr) => { 3,885 ( 0.00%) return Some((RefOp::AddrOf(mutability), sub_expr, None)); . }, . _ => return None, . }; 43,830 ( 0.00%) let mutbl = match tcx.get_diagnostic_name(def_id) { 320,829 ( 0.01%) => ???:::get_diagnostic_name (4,870x) . 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,489 ( 0.00%) matches!(self, Self::Deref) . } . . fn is_reborrow_stable(self) -> bool { . matches!(self, Self::Deref | Self::Reborrow) . } . 4,140 ( 0.00%) fn for_defined_ty<'tcx>(cx: &LateContext<'tcx>, ty: DefinedTy<'tcx>, for_return: bool) -> Self { 2,070 ( 0.00%) match ty { 3 ( 0.00%) DefinedTy::Hir(ty) => Self::for_hir_ty(ty), 1,996 ( 0.00%) DefinedTy::Mir { def_site_def_id, ty } => Self::for_mir_ty( . cx.tcx, . def_site_def_id, 2,061 ( 0.00%) cx.tcx.instantiate_bound_regions_with_erased(ty), 570,732 ( 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/fold.rs:::instantiate_bound_regions_with_erased:: (687x) . for_return, . ), . } 4,830 ( 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; . // . // Here `y1` and `y2` would resolve to different types, so the type `&Box<_>` is not stable when . // switching to auto-dereferencing. . fn for_hir_ty<'tcx>(ty: &'tcx hir::Ty<'tcx>) -> Self { 6 ( 0.00%) let TyKind::Ref(_, ty) = &ty.kind else { . return Self::None; . }; . let mut ty = ty; . . loop { 21 ( 0.00%) break match ty.ty.kind { . TyKind::Ref(_, ref ref_ty) => { . ty = ref_ty; . continue; . }, . TyKind::Path( . QPath::TypeRelative(_, path) . | QPath::Resolved( . _, . Path { 24 ( 0.00%) segments: [.., path], .. . }, . ), . ) => { 9 ( 0.00%) if let Some(args) = path.args . && args.args.iter().any(|arg| match arg { . hir::GenericArg::Infer(_) => true, . hir::GenericArg::Type(ty) => ty_contains_infer(ty.as_unambig_ty()), . _ => false, . }) . { . Self::Reborrow . } else { -- line 886 ---------------------------------------- -- 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,374 ( 0.00%) let ty::Ref(_, mut ty, _) = *ty.kind() else { . return Self::None; . }; . 1,244 ( 0.00%) if let Some(def_id) = def_site_def_id { 2,460 ( 0.00%) let typing_env = ty::TypingEnv::non_body_analysis(tcx, def_id); 1,524,982 ( 0.04%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/mod.rs:::non_body_analysis:: (615x) . ty = tcx . .try_normalize_erasing_regions(typing_env, Unnormalized::new_wip(ty)) . .unwrap_or(ty); . } . loop { 3,110 ( 0.00%) break match *ty.kind() { . ty::Ref(_, ref_ty, _) => { . ty = ref_ty; . continue; . }, 186 ( 0.00%) ty::Param(_) if for_return => Self::Deref, . ty::Alias( . _, . ty::AliasTy { . kind: ty::Free { .. } | ty::Inherent { .. }, . .. . }, . ) => unreachable!("should have been normalized away above"), . ty::Alias( -- line 939 ---------------------------------------- -- line 952 ---------------------------------------- . kind: ty::Opaque { .. }, . .. . }, . ) . | ty::Placeholder(_) . | ty::Dynamic(..) . | ty::Param(_) => Self::Reborrow, . ty::Adt(_, args) 951 ( 0.00%) if ty.has_placeholders() . || ty.has_opaque_types() 1,189 ( 0.00%) || (!for_return && args.has_non_region_param()) => . { . Self::Reborrow . }, . ty::Bool . | ty::Char . | ty::Int(_) . | ty::Uint(_) . | ty::Array(..) -- line 970 ---------------------------------------- -- line 1030 ---------------------------------------- . } . . impl<'tcx> Dereferencing<'tcx> { . fn in_deref_impl(&self) -> bool { . self.outermost_deref_impl.is_some() . } . . fn check_local_usage(&mut self, cx: &LateContext<'tcx>, e: &Expr<'tcx>, local: HirId) { 67,436 ( 0.00%) if let Some(outer_pat) = self.ref_locals.get_mut(&local) 210,960 ( 0.01%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::get_mut:: (16,859x) 32 ( 0.00%) && let Some(pat) = outer_pat . // Check for auto-deref 28 ( 0.00%) && !matches!( 60 ( 0.00%) cx.typeck_results().expr_adjustments(e), 686 ( 0.00%) => ???:::expr_adjustments (16x) 48 ( 0.00%) [ . Adjustment { . kind: Adjust::Deref(_), . .. . }, . Adjustment { . kind: Adjust::Deref(_), . .. . }, . .. . ] . ) . { 26 ( 0.00%) match get_parent_expr(cx, e) { 238 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (2x) . // Field accesses are the same no matter the number of references. . Some(Expr { . kind: ExprKind::Field(..), . .. . }) => (), . Some(&Expr { . span, . kind: ExprKind::Unary(UnOp::Deref, _), . .. . }) if !span.from_expansion() => { . // Remove explicit deref. . let snip = snippet_with_context(cx, e.span, span.ctxt(), "..", &mut pat.app).0; . pat.replacements.push((span, snip.into())); . }, 4 ( 0.00%) Some(parent) if !parent.span.from_expansion() => { . // Double reference might be needed at this point. . if cx.precedence(parent) == ExprPrecedence::Unambiguous { . // Parentheses would be needed here, don't lint. . *outer_pat = None; . } else { . pat.always_deref = false; . let snip = snippet_with_context(cx, e.span, parent.span.ctxt(), "..", &mut pat.app).0; . pat.replacements.push((e.span, format!("&{snip}"))); . } . }, 4 ( 0.00%) _ if !e.span.from_expansion() => { . // Double reference might be needed at this point. 2 ( 0.00%) pat.always_deref = false; 4 ( 0.00%) let snip = snippet_with_applicability(cx, e.span, "..", &mut pat.app); 18 ( 0.00%) pat.replacements.push((e.span, format!("&{snip}"))); . }, . // Edge case for macros. The span of the identifier will usually match the context of the . // 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)] 4,910 ( 0.00%) fn report( . &self, . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . state: State, . data: StateData<'tcx>, . typeck: &'tcx TypeckResults<'tcx>, . ) { 3,928 ( 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 1151 ---------------------------------------- . Mutability::Not => "explicit `deref` method call", . Mutability::Mut => "explicit `deref_mut` method call", . }, . "try", . format!("{addr_of_str}{deref_str}{expr_str}"), . app, . ); . }, 116 ( 0.00%) State::DerefedBorrow(state) => { . // Do not suggest removing a non-mandatory `&` in `&*rawptr` in an `unsafe` context, . // as this may make rustc trigger its `dangerous_implicit_autorefs` lint. 290 ( 0.00%) if let ExprKind::AddrOf(BorrowKind::Ref, _, subexpr) = data.first_expr.kind 128 ( 0.00%) && let ExprKind::Unary(UnOp::Deref, subsubexpr) = subexpr.kind 8 ( 0.00%) && cx.typeck_results().expr_ty_adjusted(subsubexpr).is_raw_ptr() 212 ( 0.00%) => ???:::expr_ty_adjusted (4x) . { . return; . } . 116 ( 0.00%) let mut app = Applicability::MachineApplicable; 116 ( 0.00%) let (snip, snip_is_macro) = 116 ( 0.00%) snippet_with_context(cx, expr.span, data.first_expr.span.ctxt(), "..", &mut app); . span_lint_hir_and_then( . cx, 116 ( 0.00%) NEEDLESS_BORROW, 116 ( 0.00%) data.first_expr.hir_id, . data.first_expr.span, . state.msg, 58 ( 0.00%) |diag| { 522 ( 0.00%) let needs_paren = match cx.tcx.parent_hir_node(data.first_expr.hir_id) { 6,264 ( 0.00%) => ???:::parent_hir_node (58x) 171 ( 0.00%) Node::Expr(e) => match e.kind { 48 ( 0.00%) ExprKind::Call(callee, _) if callee.hir_id != data.first_expr.hir_id => false, . ExprKind::Call(..) => { . cx.precedence(expr) < ExprPrecedence::Unambiguous . || matches!(expr.kind, ExprKind::Field(..)) . }, 231 ( 0.00%) _ => cx.precedence(expr) < cx.precedence(e), 6,620 ( 0.00%) => ???:::precedence (66x) . }, . _ => false, . }; 229 ( 0.00%) let is_in_tuple = matches!( 232 ( 0.00%) get_parent_expr(cx, data.first_expr), 6,902 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (58x) . Some(Expr { . kind: ExprKind::Tup(..), . .. . }) . ); . 306 ( 0.00%) let sugg = if !snip_is_macro && needs_paren && !has_enclosing_paren(&snip) && !is_in_tuple { 52 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/borrow.rs:clippy_utils::sugg::has_enclosing_paren::<&alloc::borrow::Cow> (4x) 12 ( 0.00%) format!("({snip})") . } else { . snip.into() . }; 174 ( 0.00%) diag.span_suggestion(data.first_expr.span, "change this to", sugg, app); 174 ( 0.00%) }, . ); . }, 9 ( 0.00%) State::ExplicitDeref { mutability } => { . if is_block_like(expr) . && let ty::Ref(_, ty, _) = data.adjusted_ty.kind() . && ty.is_sized(cx.tcx, cx.typing_env()) . { . // Rustc bug: auto deref doesn't work on block expression when targeting sized types. . return; . } . 36 ( 0.00%) let ty = typeck.expr_ty(expr); 360 ( 0.00%) => ???:::expr_ty (9x) . . // `&&[T; N]`, or `&&..&[T; N]` (src) cannot coerce to `&[T]` (dst). 18 ( 0.00%) if let ty::Ref(_, dst, _) = data.adjusted_ty.kind() 9 ( 0.00%) && dst.is_slice() . { 6 ( 0.00%) let (src, n_src_refs, _) = peel_and_count_ty_refs(ty); 27 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::peel_and_count_ty_refs (3x) 9 ( 0.00%) if n_src_refs >= 2 && src.is_array() { . return; . } . } . 45 ( 0.00%) let (prefix, needs_paren) = match mutability { 9 ( 0.00%) Some(mutability) if !ty.is_ref() => { . let prefix = match mutability { . Mutability::Not => "&", . Mutability::Mut => "&mut ", . }; 21 ( 0.00%) (prefix, cx.precedence(expr) < ExprPrecedence::Prefix) 856 ( 0.00%) => ???:::precedence (7x) . }, . None if !ty.is_ref() && data.adjusted_ty.is_ref() => ("&", false), . _ => ("", false), . }; . span_lint_hir_and_then( . cx, 18 ( 0.00%) EXPLICIT_AUTO_DEREF, 18 ( 0.00%) data.first_expr.hir_id, 9 ( 0.00%) data.first_expr.span, . "deref which would be done by auto-deref", . |diag| { 9 ( 0.00%) let mut app = Applicability::MachineApplicable; 36 ( 0.00%) let (snip, snip_is_macro) = 36 ( 0.00%) snippet_with_context(cx, expr.span, data.first_expr.span.ctxt(), "..", &mut app); 36 ( 0.00%) let sugg = if !snip_is_macro && needs_paren && !has_enclosing_paren(&snip) { . format!("{prefix}({snip})") . } else { 63 ( 0.00%) format!("{prefix}{snip}") . }; 9 ( 0.00%) diag.span_suggestion(data.first_expr.span, "try", sugg, app); . }, . ); . }, . State::ExplicitDerefField { . derefs_manually_drop, .. . } => { . let (snip_span, needs_parens) = if matches!(expr.kind, ExprKind::Field(..)) . && (derefs_manually_drop -- line 1262 ---------------------------------------- -- line 1290 ---------------------------------------- . let sugg = if needs_parens { . format!("({snip})") . } else { . snip.into_owned() . }; . diag.span_suggestion(data.first_expr.span, "try", sugg, app); . }, . ); 58 ( 0.00%) }, . State::Borrow { .. } | State::Reborrow { .. } => (), . } 3,928 ( 0.00%) } . } 135,742 ( 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 { 621,460 ( 0.02%) fn check_expr<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) { 186,438 ( 0.01%) if expr.span.in_external_macro(cx.sess().source_map()) { . return; . } . 94,760 ( 0.00%) match expr.kind { . // `T::BITS - n.leading_zeros()` . ExprKind::Binary(op, left, right) . if op.node == BinOpKind::Sub 264 ( 0.00%) && let ExprKind::MethodCall(leading_zeros, recv, [], _) = right.kind 9 ( 0.00%) && leading_zeros.ident.name == sym::leading_zeros . && let ExprKind::Path(QPath::TypeRelative(hir_ty, segment)) = left.kind . && segment.ident.name == sym::BITS . && let right_ty = cx.typeck_results().expr_ty(recv) . && let Some(right_int_kind) = get_int_kind(cx, right_ty) . && let left_ty = cx.typeck_results().node_type(hir_ty.hir_id) . && let Some(left_int_kind) = get_int_kind(cx, left_ty) . && self.msrv.meets(cx, msrvs::BIT_WIDTH) . && left.span.eq_ctxt(right.span) -- line 119 ---------------------------------------- -- line 124 ---------------------------------------- . emit_manual_bit_width(cx, recv, expr, right_int_kind); . } else { . // mismatched calling types . emit_type_mismatch(cx, recv, expr, right_int_kind); . } . }, . _ => {}, . } 497,168 ( 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: /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)] 17,250 ( 0.00%) #[derive(Copy, Debug, Hash)] 320 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::hash:: (9x) . #[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 { 407,335 ( 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 { 210,869 ( 0.01%) match self { . None => false, 48,872 ( 0.00%) Some(x) => f(x), 22,636 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/only_used_in_recursion.rs:::check_expr::{closure#0} (1,721x) . } . } . . /// Returns `true` if the option is a [`None`] value. . /// . /// # Examples . /// . /// ``` -- line 670 ---------------------------------------- -- line 675 ---------------------------------------- . /// assert_eq!(x.is_none(), true); . /// ``` . #[must_use = "if you intended to assert that this doesn't have a value, consider \ . wrapping this in an `assert!()` instead"] . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_option_basics", since = "1.48.0")] . pub const fn is_none(&self) -> bool { 201 ( 0.00%) !self.is_some() . } . . /// Returns `true` if the option is a [`None`] or the value inside of it matches a predicate. . /// . /// # Examples . /// . /// ``` . /// let x: Option = Some(2); -- line 691 ---------------------------------------- -- line 701 ---------------------------------------- . /// assert_eq!(x.as_ref().is_none_or(|x| x.len() > 1), true); . /// println!("still alive {:?}", x); . /// ``` . #[must_use] . #[inline] . #[stable(feature = "is_none_or", since = "1.82.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn is_none_or(self, f: impl [const] FnOnce(T) -> bool + [const] Destruct) -> bool { 363,487 ( 0.01%) match self { . None => true, 5 ( 0.00%) Some(x) => f(x), . } . } . . ///////////////////////////////////////////////////////////////////////// . // Adapter for working with references . ///////////////////////////////////////////////////////////////////////// . . /// Converts from `&Option` to `Option<&T>`. -- line 719 ---------------------------------------- -- line 735 ---------------------------------------- . /// // then consume *that* with `map`, leaving `text` on the stack. . /// let text_length: Option = text.as_ref().map(|s| s.len()); . /// println!("still can print text: {text:?}"); . /// ``` . #[inline] . #[rustc_const_stable(feature = "const_option_basics", since = "1.48.0")] . #[stable(feature = "rust1", since = "1.0.0")] . pub const fn as_ref(&self) -> Option<&T> { 189,163 ( 0.01%) 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> { 221,494 ( 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. 10,913 ( 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 { 601,237 ( 0.02%) match self { 2,412 ( 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 { 27,717 ( 0.00%) match self { 13,575 ( 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, . { 286,168 ( 0.01%) match self { 4,000 ( 0.00%) Some(x) => x, 27 ( 0.00%) None => default, . } 2 ( 0.00%) } 40 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue:: (2x) . . /// Returns the contained [`Some`] value or computes it from a closure. . /// . /// # Examples . /// . /// ``` . /// let k = 10; . /// assert_eq!(Some(4).unwrap_or_else(|| 2 * k), 4); -- line 1052 ---------------------------------------- -- 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, . { 28,961 ( 0.00%) match self { 16,439 ( 0.00%) Some(x) => x, . None => f(), . } . } . . /// Returns the contained [`Some`] value or a default. . /// . /// Consumes the `self` argument then, if [`Some`], returns the contained . /// value, otherwise if [`None`], returns the [default value] for that -- line 1072 ---------------------------------------- -- line 1087 ---------------------------------------- . /// [`FromStr`]: crate::str::FromStr . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn unwrap_or_default(self) -> T . where . T: [const] Default, . { 8,883 ( 0.00%) match self { 13,147 ( 0.00%) Some(x) => x, . None => T::default(), . } 4 ( 0.00%) } . . /// Returns the contained [`Some`] value, consuming the `self` value, . /// without checking that the value is not [`None`]. . /// . /// # Safety . /// . /// Calling this method on [`None`] is *[undefined behavior]*. . /// -- line 1107 ---------------------------------------- -- 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, . { 563,379 ( 0.02%) match self { 75,487 ( 0.00%) Some(x) => Some(f(x)), 309 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/question_mark.rs:clippy_lints::question_mark::check_if_let_some_or_err_and_early_return::{closure#0} (1x) 1,050 ( 0.00%) None => None, . } 263 ( 0.00%) } . . /// Calls a function with a reference to the contained value if [`Some`]. . /// . /// Returns the original option. . /// . /// # Examples . /// . /// ``` -- line 1174 ---------------------------------------- -- line 1214 ---------------------------------------- . /// . /// let x: Option<&str> = None; . /// assert_eq!(x.map_or(42, |v| v.len()), 42); . /// ``` . #[inline] . #[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")] 12 ( 0.00%) pub const fn map_or(self, default: U, f: F) -> U . where . F: [const] FnOnce(T) -> U + [const] Destruct, . U: [const] Destruct, . { 41,271 ( 0.00%) match self { 9,446 ( 0.00%) Some(t) => f(t), 5,225 ( 0.00%) None => default, . } 5,591 ( 0.00%) } 1,524 ( 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:: (254x) . . /// 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, . { 14,225 ( 0.00%) match self { 114 ( 0.00%) Some(t) => f(t), . None => default(), . } 1,386 ( 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, . { 51,460 ( 0.00%) match self { 42,301 ( 0.00%) Some(x) => f(x), 281 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/methods/unnecessary_fallible_conversions.rs:clippy_lints::methods::unnecessary_fallible_conversions::check::{closure#0} (3x) 13,195 ( 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, . { 208,390 ( 0.01%) if let Some(x) = self { 27,731 ( 0.00%) if predicate(&x) { 9,402 ( 0.00%) return Some(x); . } . } 63,452 ( 0.00%) None 25 ( 0.00%) } . . /// Returns the option if it contains a value, otherwise returns `optb`. . /// . /// Arguments passed to `or` are eagerly evaluated; if you are passing the . /// result of a function call, it is recommended to use [`or_else`], which is . /// lazily evaluated. . /// . /// [`or_else`]: Option::or_else -- line 1593 ---------------------------------------- -- line 1613 ---------------------------------------- . /// ``` . #[inline] . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn or(self, optb: Option) -> Option . where . T: [const] Destruct, . { 2,078 ( 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, . { 19,021 ( 0.00%) match self { 278 ( 0.00%) x @ Some(_) => x, . None => f(), . } 90 ( 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, . { 15,913 ( 0.00%) *self = Some(value); . . // SAFETY: the code above just filled the option . unsafe { self.as_mut().unwrap_unchecked() } . } . . /// Inserts `value` into the option if it is [`None`], then . /// returns a mutable reference to the contained value. . /// -- line 1730 ---------------------------------------- -- line 1801 ---------------------------------------- . /// ``` . #[inline] . #[stable(feature = "option_entry", since = "1.20.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn get_or_insert_with(&mut self, f: F) -> &mut T . where . F: [const] FnOnce() -> T + [const] Destruct, . { 4,755 ( 0.00%) if let None = self { . // The effect of the following statement is identical to . // *self = Some(f()); . // except that it does not drop the old value of `*self`. This is not a leak, because . // we just checked that the old value is `None`, which contains no fields to drop. . // This implementation strategy . // . // * avoids needing a `T: [const] Destruct` bound, to the benefit of `const` callers, . // * and avoids possibly compiling needless drop code (as would sometimes happen in the -- line 1817 ---------------------------------------- -- line 1976 ---------------------------------------- . /// ``` . #[stable(feature = "option_zip_option", since = "1.46.0")] . #[rustc_const_unstable(feature = "const_option_ops", issue = "143956")] . pub const fn zip(self, other: Option) -> Option<(T, U)> . where . T: [const] Destruct, . U: [const] Destruct, . { 798 ( 0.00%) match (self, other) { . (Some(a), Some(b)) => Some((a, b)), . _ => None, . } . } . . /// Combines the value in `self` with the value in another `Option`, using the function `f`. . /// . /// If `self` is `Some(s)` and `other` is `Some(o)`, this method returns `Some(f(s, o))`. -- line 1992 ---------------------------------------- -- line 2129 ---------------------------------------- . #[stable(feature = "copied", since = "1.35.0")] . #[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 2 ( 0.00%) match self { 82,321 ( 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 { 729,193 ( 0.02%) match self { 1,188 ( 0.00%) Some(x) => Some(x.clone()), . None => None, . } . } . . #[inline] . fn clone_from(&mut self, source: &Self) { . match (self, source) { . (Some(to), Some(from)) => to.clone_from(from), -- line 2283 ---------------------------------------- -- line 2431 ---------------------------------------- . impl crate::marker::StructuralPartialEq for Option {} . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_cmp", issue = "143800")] . const impl PartialEq for Option { . #[inline] . fn eq(&self, other: &Self) -> bool { . // Spelling out the cases explicitly optimizes better than . // `_ => false` 1,250,625 ( 0.03%) match (self, other) { 144 ( 0.00%) (Some(l), Some(r)) => *l == *r, 2,808 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eq (72x) . (Some(_), None) => false, . (None, Some(_)) => false, . (None, None) => true, . } . } . } . . // Manually implementing here somewhat improves codegen for -- line 2448 ---------------------------------------- -- line 2659 ---------------------------------------- . iter: Option, . } . . #[unstable(feature = "option_into_flat_iter", issue = "148441")] . impl Iterator for OptionFlatten { . type Item = A::Item; . . fn next(&mut self) -> Option { 52 ( 0.00%) match &mut self.iter { . Some(iter) => iter.next(), . None => None, . } . } . . fn size_hint(&self) -> (usize, Option) { . match &self.iter { . Some(iter) => iter.size_hint(), -- line 2675 ---------------------------------------- -- line 2844 ---------------------------------------- . /// assert_eq!(res, None); . /// assert_eq!(shared, 6); . /// ``` . /// . /// Since the third element caused an underflow, no further elements were taken, . /// so the final value of `shared` is 6 (= `3 + 2 + 1`), not 16. . #[inline] . fn from_iter>>(iter: I) -> Option { 120 ( 0.00%) iter::try_process(iter.into_iter(), |i| i.collect()) 21,441 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/mod.rs:core::iter::adapters::try_process::, ::multi::{closure#0}>, clippy_utils::consts::Constant, core::option::Option, > as core::iter::traits::collect::FromIterator>>::from_iter, ::multi::{closure#0}>>::{closure#0}, alloc::vec::Vec> (110x) . } . } . . #[unstable(feature = "try_trait_v2", issue = "84277", old_name = "try_trait")] . #[rustc_const_unstable(feature = "const_try", issue = "74935")] . const impl ops::Try for Option { . type Output = T; . type Residual = Option; -- line 2860 ---------------------------------------- -- line 2861 ---------------------------------------- . . #[inline] . fn from_output(output: Self::Output) -> Self { . Some(output) . } . . #[inline] . fn branch(self) -> ControlFlow { 517,915 ( 0.01%) match self { 19,390 ( 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 { 7,340 ( 0.00%) None => None, . } . } . } . . #[diagnostic::do_not_recommend] . #[unstable(feature = "try_trait_v2_yeet", issue = "96374")] . #[rustc_const_unstable(feature = "const_try", issue = "74935")] . const impl ops::FromResidual> for Option { -- line 2892 ---------------------------------------- -- line 2929 ---------------------------------------- . /// ``` . #[inline] . #[stable(feature = "option_flattening", since = "1.40.0")] . #[rustc_allow_const_fn_unstable(const_precise_live_drops)] . #[rustc_const_stable(feature = "const_option", since = "1.83.0")] . pub const fn flatten(self) -> Option { . // FIXME(const-hack): could be written with `and_then` . match self { 6 ( 0.00%) Some(inner) => inner, 145 ( 0.00%) None => None, . } 2 ( 0.00%) } . } . . impl<'a, T> Option<&'a Option> { . /// Converts from `Option<&Option>` to `Option<&T>`. . /// . /// # Examples . /// . /// Basic usage: -- line 2948 ---------------------------------------- 702,452 ( 0.02%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/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. 83,825 ( 0.00%) if old_size > MAX_REFCOUNT { . abort(); . } . 167,628 ( 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 { 513,653 ( 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. 145,741 ( 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 { 7 ( 0.00%) self.drop_slow(); 144,008 ( 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) 669 ( 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 ---------------------------------------- 1,658,004 ( 0.05%) -------------------------------------------------------------------------------- -- 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 { 559,314 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { . use rustc_ast::LitKind; . 501,703 ( 0.01%) if let ExprKind::Call(fun, [bytes_arg]) = e.kind . // Find `std::str::converts::from_utf8` or `std::primitive::str::from_utf8` 13,320 ( 0.00%) && let Some(sym::str_from_utf8 | sym::str_inherent_from_utf8) = 4,535 ( 0.00%) fun.res(cx).opt_diag_name(cx) . . // Find string::as_bytes 20 ( 0.00%) && let ExprKind::AddrOf(BorrowKind::Ref, _, args) = bytes_arg.kind 16 ( 0.00%) && let ExprKind::Index(left, right, _) = args.kind 24 ( 0.00%) && let (method_names, expressions, _) = method_calls(left, 1) 792 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::method_calls (4x) . && method_names == [sym::as_bytes] . && expressions.len() == 1 . && expressions[0].1.is_empty() . . // Check for slicer . && let ExprKind::Struct(&qpath, _, _) = right.kind . && cx.tcx.qpath_is_lang_item(qpath, LangItem::Range) . { -- line 305 ---------------------------------------- -- 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, . ); . } . 137,476 ( 0.00%) if !e.span.in_external_macro(cx.sess().source_map()) . && let ExprKind::MethodCall(path, receiver, ..) = &e.kind 12,758 ( 0.00%) && path.ident.name == sym::as_bytes 30 ( 0.00%) && let ExprKind::Lit(lit) = &receiver.kind . && let LitKind::Str(lit_content, _) = &lit.node . { . let callsite = snippet(cx, receiver.span.source_callsite(), r#""foo""#); . let mut applicability = Applicability::MachineApplicable; . if callsite.starts_with("include_str!") { . span_lint_and_sugg( . cx, . STRING_LIT_AS_BYTES, -- line 334 ---------------------------------------- -- line 362 ---------------------------------------- . snippet_with_applicability(cx, receiver.span, r#""foo""#, &mut applicability) . ), . applicability, . ); . } . } . } . 75,330 ( 0.00%) if let ExprKind::MethodCall(path, recv, [], _) = &e.kind 7,492 ( 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, . ); . } 497,168 ( 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'_>) { . let tyckres = cx.typeck_results(); 141,222 ( 0.00%) if let ExprKind::MethodCall(path, split_recv, [], split_ws_span) = expr.kind 3,746 ( 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, . ); . } 497,168 ( 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 ---------------------------------------- 66,693 ( 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), . } . 3,232 ( 0.00%) fn get_ascii_type<'a>(cx: &LateContext<'a>, kind: rustc_hir::ExprKind<'_>) -> Option<(Span, MatchType<'a>)> { 2,144 ( 0.00%) if let MethodCall(path, expr, _, _) = kind { 62 ( 0.00%) let is_lower = match path.ident.name { 248 ( 0.00%) 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) . || ty.is_str() . || ty.is_slice() -- line 60 ---------------------------------------- -- 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 3,232 ( 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 { 497,168 ( 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 124,292 ( 0.00%) if let Binary(op, left, right) = &expr.kind 4,396 ( 0.00%) && (op.node == BinOpKind::Eq || op.node == BinOpKind::Ne) 6,868 ( 0.00%) && let Some((left_span, left_val)) = get_ascii_type(cx, left.kind) 9,850 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/manual_ignore_case_cmp.rs:clippy_lints::manual_ignore_case_cmp::get_ascii_type (404x) . && 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, . ); . }, . ); . } 497,168 ( 0.01%) } . } 3,026 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/implicit_clone.rs -------------------------------------------------------------------------------- Ir -- line 5 ---------------------------------------- . use clippy_utils::ty::{implements_trait, peel_and_count_ty_refs}; . use rustc_errors::Applicability; . use rustc_hir as hir; . use rustc_lint::LateContext; . use rustc_span::Symbol; . . use super::IMPLICIT_CLONE; . 153 ( 0.00%) pub fn check(cx: &LateContext<'_>, method_name: Symbol, expr: &hir::Expr<'_>, recv: &hir::Expr<'_>) { 136 ( 0.00%) if let Some(method_parent_id) = cx.typeck_results().type_dependent_def_id(expr.hir_id).opt_parent(cx) 879 ( 0.00%) => ???:::type_dependent_def_id (17x) 119 ( 0.00%) && is_clone_like(cx, method_name, method_parent_id) 5,670 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/implicit_clone.rs:clippy_lints::methods::implicit_clone::is_clone_like (17x) 55 ( 0.00%) && let return_type = cx.typeck_results().expr_ty(expr) 440 ( 0.00%) => ???:::expr_ty (11x) 33 ( 0.00%) && let input_type = cx.typeck_results().expr_ty(recv) 440 ( 0.00%) => ???:::expr_ty (11x) 44 ( 0.00%) && let (input_type, ref_count, _) = peel_and_count_ty_refs(input_type) 209 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::peel_and_count_ty_refs (11x) 44 ( 0.00%) && !(ref_count > 0 && method_parent_id.is_diag_item(cx, sym::ToOwned)) 3 ( 0.00%) && let Some(ty_name) = input_type.ty_adt_def().map(|adt_def| cx.tcx.item_name(adt_def.did())) 3 ( 0.00%) && return_type == input_type 9 ( 0.00%) && let Some(clone_trait) = cx.tcx.lang_items().clone_trait() 120 ( 0.00%) => ???:::lang_items (3x) 21 ( 0.00%) && implements_trait(cx, return_type, clone_trait, &[]) 41,712 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (3x) . { 6 ( 0.00%) let mut app = Applicability::MachineApplicable; 18 ( 0.00%) let recv_snip = snippet_with_context(cx, recv.span, expr.span.ctxt(), "..", &mut app).0; 45 ( 0.00%) span_lint_and_sugg( 7,653 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_sugg:: (3x) . cx, . IMPLICIT_CLONE, . expr.span, 18 ( 0.00%) format!("implicitly cloning a `{ty_name}` by calling `{method_name}` on its dereferenced type"), . "consider using", 6 ( 0.00%) if ref_count > 1 { . format!("({}{recv_snip}).clone()", "*".repeat(ref_count - 1)) . } else { 9 ( 0.00%) format!("{recv_snip}.clone()") . }, . app, . ); 6 ( 0.00%) } 136 ( 0.00%) } . . /// Returns true if the named method can be used to clone the receiver. 7,400 ( 0.00%) pub fn is_clone_like(cx: &LateContext<'_>, method_name: Symbol, method_parent_id: hir::def_id::DefId) -> bool { . match method_name { 26,210 ( 0.00%) sym::to_os_string => method_parent_id.opt_impl_ty(cx).is_diag_item(cx, sym::OsStr), . sym::to_owned => method_parent_id.is_diag_item(cx, sym::ToOwned), . sym::to_path_buf => method_parent_id.opt_impl_ty(cx).is_diag_item(cx, sym::Path), . sym::to_string => method_parent_id.is_diag_item(cx, sym::ToString), . sym::to_vec => method_parent_id 110 ( 0.00%) .opt_impl_ty(cx) 8,079 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/res.rs:::opt_impl_ty:: (22x) . .is_some_and(|ty| ty.instantiate_identity().skip_norm_wip().is_slice()), . _ => false, . } 7,376 ( 0.00%) } 77 ( 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/version.rs -------------------------------------------------------------------------------- Ir . use std::fmt::{self, Display}; . use std::sync::OnceLock; . . use rustc_macros::{BlobDecodable, Encodable, StableHash, current_rustc_version}; . 813,756 ( 0.02%) #[derive(Encodable, BlobDecodable, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] . #[derive(StableHash)] . pub struct RustcVersion { . pub major: u16, . pub minor: u16, . pub patch: u16, . } . . impl RustcVersion { -- line 14 ---------------------------------------- 394,154 ( 0.01%) -------------------------------------------------------------------------------- -- 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 373,236 ( 0.01%) pub fn hir(expr: &Expr<'tcx>) -> Option { 124,597 ( 0.00%) if let ExprKind::DropTemps(e) = expr.kind 1,295 ( 0.00%) && let ExprKind::Match(iterexpr, [arm], MatchSource::ForLoopDesugar) = e.kind 740 ( 0.00%) && let ExprKind::Call(_, [arg]) = iterexpr.kind 1,480 ( 0.00%) && let ExprKind::Loop(block, label, ..) = arm.body.kind 555 ( 0.00%) && let [stmt] = block.stmts 555 ( 0.00%) && let hir::StmtKind::Expr(e) = stmt.kind 925 ( 0.00%) && let ExprKind::Match(_, [_, some_arm], _) = e.kind 1,110 ( 0.00%) && let hir::PatKind::Struct(_, [field], _) = some_arm.pat.kind . { 2,035 ( 0.00%) return Some(Self { 185 ( 0.00%) pat: field.pat, . arg, 185 ( 0.00%) body: some_arm.body, 370 ( 0.00%) loop_id: arm.body.hir_id, 370 ( 0.00%) span: expr.span.ctxt().outer_expn_data().call_site, . label, . }); . } 62,021 ( 0.00%) None 373,236 ( 0.01%) } . } . . /// An `if` expression without `let` . pub struct If<'hir> { . /// `if` condition . pub cond: &'hir Expr<'hir>, . /// `if` then expression . pub then: &'hir Expr<'hir>, -- line 65 ---------------------------------------- -- line 66 ---------------------------------------- . /// `else` expression . pub r#else: Option<&'hir Expr<'hir>>, . } . . impl<'hir> If<'hir> { . #[inline] . /// Parses an `if` expression without `let` . pub const fn hir(expr: &Expr<'hir>) -> Option { 764,257 ( 0.02%) if let ExprKind::If(cond, then, r#else) = expr.kind 60,524 ( 0.00%) && !has_let_expr(cond) 254 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::has_let_expr (7x) . { . 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 189,996 ( 0.01%) pub fn hir(cx: &LateContext<'_>, expr: &Expr<'hir>) -> Option { 390,064 ( 0.01%) if let ExprKind::If( . &Expr { . kind: . ExprKind::Let(&hir::LetExpr { 1,026 ( 0.00%) pat: let_pat, . init: let_expr, 513 ( 0.00%) span: let_span, . .. . }), . .. . }, 513 ( 0.00%) if_then, 513 ( 0.00%) if_else, 5,036 ( 0.00%) ) = expr.kind . { 1,026 ( 0.00%) let mut iter = cx.tcx.hir_parent_iter(expr.hir_id); 1,659 ( 0.00%) if let Some((_, Node::Block(Block { stmts: [], .. }))) = iter.next() 948 ( 0.00%) && let Some(( . _, . Node::Expr(Expr { . kind: ExprKind::Loop(_, _, LoopSource::While, _), . .. . }), 195 ( 0.00%) )) = iter.next() . { . // while loop desugar 168 ( 0.00%) return None; . } 1,716 ( 0.00%) return Some(Self { . let_pat, . let_expr, . if_then, . if_else, . let_span, . }); . } 189,483 ( 0.01%) None 189,996 ( 0.01%) } . } . . /// 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 7,488 ( 0.00%) pub fn parse(cx: &LateContext<'_>, expr: &Expr<'hir>) -> Option { 4,992 ( 0.00%) match expr.kind { 2,904 ( 0.00%) ExprKind::Match(expr, arms, source) => Some(Self::Match(expr, arms, source)), 2,133 ( 0.00%) _ => IfLet::hir(cx, expr).map( 11,038 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (2,133x) . |IfLet { . let_expr, . let_pat, . if_then, . if_else, . let_span, . }| { Self::IfLet(let_expr, let_pat, if_then, if_else, let_span) }, . ), . } 9,984 ( 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 { 5,705 ( 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,259,690 ( 0.03%) pub fn hir(cx: &LateContext<'_>, expr: &'a Expr<'_>) -> Option> { 251,938 ( 0.01%) let span = expr.range_span()?; 3,202,801 ( 0.09%) => ???:::range_span (125,969x) 7,818 ( 0.00%) let (ty, start, end) = match expr.kind { 384 ( 0.00%) ExprKind::Call(path, [arg1, arg2]) 896 ( 0.00%) if let ExprKind::Path(qpath) = path.kind 768 ( 0.00%) && cx.tcx.qpath_is_lang_item(qpath, hir::LangItem::RangeInclusiveNew) => 16,512 ( 0.00%) => ???:::qpath_is_lang_item (128x) . { . (RangeTy::OpsInclusive, Some(arg1), Some(arg2)) . }, 10,620 ( 0.00%) ExprKind::Struct(&qpath, fields, StructTailExpr::None) => match (cx.tcx.qpath_lang_item(qpath)?, fields) { 129,564 ( 0.00%) => ???:::qpath_lang_item (1,062x) 30 ( 0.00%) (hir::LangItem::RangeFull, []) => (RangeTy::OpsFull, None, None), 1,536 ( 0.00%) (hir::LangItem::RangeFrom, [start]) if start.ident.name == sym::start => { 512 ( 0.00%) (RangeTy::OpsFrom, Some(start.expr), None) . }, . (hir::LangItem::RangeFromCopy, [start]) if start.ident.name == sym::start => { . (RangeTy::RangeFrom, Some(start.expr), None) 15 ( 0.00%) }, 1,095 ( 0.00%) (hir::LangItem::Range, [start, end] | [end, start]) 730 ( 0.00%) if start.ident.name == sym::start && end.ident.name == sym::end => . { 730 ( 0.00%) (RangeTy::OpsRange, Some(start.expr), Some(end.expr)) 365 ( 0.00%) }, . (hir::LangItem::RangeCopy, [start, end] | [end, start]) . if start.ident.name == sym::start && end.ident.name == sym::end => . { . (RangeTy::RangeRange, Some(start.expr), Some(end.expr)) . }, . (hir::LangItem::RangeInclusiveCopy, [start, last] | [last, start]) . if start.ident.name == sym::start && last.ident.name == sym::last => . { . (RangeTy::RangeInclusive, Some(start.expr), Some(last.expr)) . }, . (hir::LangItem::RangeToInclusive, [end]) if end.ident.name == sym::end => { . (RangeTy::OpsToInclusive, None, Some(end.expr)) . }, . (hir::LangItem::RangeToInclusiveCopy, [last]) if last.ident.name == sym::last => { . (RangeTy::RangeToInclusive, None, Some(last.expr)) 170 ( 0.00%) }, 1,020 ( 0.00%) (hir::LangItem::RangeTo, [end]) if end.ident.name == sym::end => (RangeTy::OpsTo, None, Some(end.expr)), . _ => return None, . }, . _ => return None, . }; . 4,760 ( 0.00%) Some(Range { ty, start, end, span }) 1,008,942 ( 0.03%) } . } . . /// 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,312,255 ( 0.04%) pub fn hir(cx: &LateContext<'_>, expr: &'a Expr<'_>) -> Option> { 393,809 ( 0.01%) if let ExprKind::Call(fun, args) = expr.kind 38,201 ( 0.00%) && let ExprKind::Path(ref qpath) = fun.kind 113,202 ( 0.00%) && is_expn_of(fun.span, sym::vec).is_some() 2,369,596 ( 0.07%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expn_of (18,867x) 2,215 ( 0.00%) && let Some(fun_def_id) = cx.qpath_res(qpath, fun.hir_id).opt_def_id() 26,510 ( 0.00%) => ???:::qpath_res (443x) 4,150 ( 0.00%) && let Some(name) = cx.tcx.get_diagnostic_name(fun_def_id) 38,373 ( 0.00%) => ???:::get_diagnostic_name (443x) . { . return match (name, args) { 348 ( 0.00%) (sym::vec_from_elem, [elem, size]) => { . // `vec![elem; size]` case 348 ( 0.00%) Some(VecArgs::Repeat(elem, size)) 116 ( 0.00%) }, 40 ( 0.00%) (sym::box_assume_init_into_vec_unsafe, [write_box_via_move]) 100 ( 0.00%) if let ExprKind::Call(_, [_box, elems]) = write_box_via_move.kind 60 ( 0.00%) && let ExprKind::Array(elems) = elems.kind => . { . // `vec![a, b, c]` case 40 ( 0.00%) Some(VecArgs::Vec(elems)) 20 ( 0.00%) }, 1,698 ( 0.00%) (sym::vec_new, []) => Some(VecArgs::Vec(&[])), 18,424 ( 0.00%) _ => None, . }; . } . 18,424 ( 0.00%) None 1,312,255 ( 0.04%) } . } . . /// 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 404 ---------------------------------------- . pub span: Span, . pub label: Option, . } . . impl<'hir> While<'hir> { . #[inline] . /// Parses a desugared `while` loop . pub const fn hir(expr: &Expr<'hir>) -> Option { 545 ( 0.00%) if let ExprKind::Loop( . Block { . expr: . Some(Expr { . kind: ExprKind::If(condition, body, _), . .. . }), . .. . }, . label, . LoopSource::While, 67 ( 0.00%) span, 258 ( 0.00%) ) = expr.kind 268 ( 0.00%) && !has_let_expr(condition) 2,303 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::has_let_expr (67x) . { . return Some(Self { . condition, . body, . span, . label, . }); . } -- line 433 ---------------------------------------- -- 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 { 302,956 ( 0.01%) if let ExprKind::Loop( . &Block { . expr: . Some(&Expr { . kind: . ExprKind::If( . &Expr { . kind: . ExprKind::Let(&hir::LetExpr { 105 ( 0.00%) pat: let_pat, 42 ( 0.00%) init: let_expr, . span: let_span, . .. . }), . .. . }, 21 ( 0.00%) if_then, . _, . ), . .. . }), . .. . }, 42 ( 0.00%) label, . LoopSource::While, . _, 2,844 ( 0.00%) ) = expr.kind . { . return Some(Self { . let_pat, . let_expr, . if_then, . label, . let_span, . }); -- line 490 ---------------------------------------- -- 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. 15,477 ( 0.00%) pub fn get_vec_init_kind<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) -> Option { 4,808 ( 0.00%) if let ExprKind::Call(func, args) = expr.kind { 1,930 ( 0.00%) match func.kind { 49 ( 0.00%) ExprKind::Path(QPath::TypeRelative(ty, name)) 1,754 ( 0.00%) if cx.typeck_results().node_type(ty.hir_id).is_diag_item(cx, sym::Vec) => 9,085 ( 0.00%) => ???:::node_type (221x) . { 278 ( 0.00%) if name.ident.name == sym::new { 82 ( 0.00%) return Some(VecInitKind::New); . } else if name.ident.name == symbol::kw::Default { . return Some(VecInitKind::Default); . } else if name.ident.name == sym::with_capacity { . let arg = args.first()?; 56 ( 0.00%) return match ConstEvalCtxt::new(cx).eval_local(arg, expr.span.ctxt()) { 9,548 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local (8x) 448 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (8x) . Some(Constant::Int(num)) => Some(VecInitKind::WithConstCapacity(num)), 24 ( 0.00%) _ => Some(VecInitKind::WithExprCapacity(arg.hir_id)), . }; . } . }, . ExprKind::Path(QPath::Resolved(_, path)) 1,977 ( 0.00%) if cx.tcx.is_diagnostic_item(sym::default_fn, path.res.opt_def_id()?) 14,084 ( 0.00%) => ???:::is_diagnostic_item (151x) . && cx.typeck_results().expr_ty(expr).is_diag_item(cx, sym::Vec) => . { . return Some(VecInitKind::Default); . }, . _ => (), . } . } . None 19,899 ( 0.00%) } . . /// Checks that a condition doesn't have a `let` expression, to keep `If` and `While` from accepting . /// `if let` and `while let`. 98,400 ( 0.00%) pub const fn has_let_expr<'tcx>(cond: &'tcx Expr<'tcx>) -> bool { 144,932 ( 0.00%) match &cond.kind { . ExprKind::Let(_) => true, 33,565 ( 0.00%) ExprKind::Binary(_, lhs, rhs) => has_let_expr(lhs) || has_let_expr(rhs), 125,223 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::has_let_expr'2 (5,592x) . _ => false, . } 98,400 ( 0.00%) } 472,864 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/loops/needless_range_loop.rs -------------------------------------------------------------------------------- Ir -- line 17 ---------------------------------------- . use rustc_middle::middle::region; . use rustc_middle::ty::{self, Ty}; . use rustc_span::symbol::{Symbol, sym}; . use rustc_span::{Span, SyntaxContext}; . . /// Checks for looping over a range and then indexing a sequence with it. . /// The iteratee must be a range literal. . #[expect(clippy::too_many_lines)] 2,112 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . pat: &'tcx Pat<'_>, . arg: &'tcx Expr<'_>, . body: &'tcx Expr<'_>, . expr: &'tcx Expr<'_>, . ) { 216 ( 0.00%) if let Some(higher::Range { . start: Some(start), . ref end, . ty: range_ty, 80 ( 0.00%) span, 784 ( 0.00%) }) = higher::Range::hir(cx, arg) 23,829 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (176x) . // the var must be a single name 250 ( 0.00%) && let PatKind::Binding(_, canonical_id, ident, _) = pat.kind . { 578 ( 0.00%) let mut visitor = VarVisitor { . cx, . var: canonical_id, . indexed_mut: FxHashSet::default(), . indexed_indirectly: FxHashMap::default(), . unnamed_indexed_indirectly: false, . indexed_directly: FxIndexMap::default(), . unnamed_indexed_directly: false, . referenced: FxHashSet::default(), . nonindex: false, . prefer_mutable: false, . }; 68 ( 0.00%) walk_expr(&mut visitor, body); 989,291 ( 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:: (34x) . . // linting condition: we only indexed one variable, and indexed it directly 158 ( 0.00%) if visitor.indexed_indirectly.is_empty() . && !visitor.unnamed_indexed_indirectly . && !visitor.unnamed_indexed_directly 191 ( 0.00%) && let mut indexed_directly_iter = visitor.indexed_directly.into_iter() 10 ( 0.00%) && let Some(((indexed, indexed_extended), (indexed_extent, indexed_span))) = indexed_directly_iter.next() . && indexed_directly_iter.next().is_none() . { . // ensure that the indexed variable was declared before the loop, see #601 8 ( 0.00%) if let Some(indexed_extent) = indexed_extent { 20 ( 0.00%) let parent_def_id = cx.tcx.hir_get_parent_item(expr.hir_id); 76 ( 0.00%) => ???:::hir_get_parent_item (4x) . let region_scope_tree = cx.tcx.region_scope_tree(parent_def_id); 16 ( 0.00%) let pat_extent = region_scope_tree.var_scope(pat.hir_id.local_id).unwrap(); 224 ( 0.00%) => ???:::var_scope (4x) 28 ( 0.00%) if region_scope_tree.is_subscope_of(indexed_extent, pat_extent) { 1,041 ( 0.00%) => ???:::is_subscope_of (4x) . return; . } . } . . // don't lint if the container that is indexed does not have .iter() method 12 ( 0.00%) let indexed_ty = cx.typeck_results().expr_ty(indexed_extended.expr); 160 ( 0.00%) => ???:::expr_ty (4x) 12 ( 0.00%) let has_iter = has_iter_method(cx, indexed_ty); 1,084 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::has_iter_method (4x) 4 ( 0.00%) if has_iter.is_none() { . return; . } . . // don't lint if the container that is indexed into is also used without . // indexing 8 ( 0.00%) if visitor.referenced.contains(&indexed) { . return; . } . . let starts_at_zero = is_integer_literal(start, 0); . 4 ( 0.00%) let skip = if starts_at_zero { . String::new() . } else if visitor.indexed_mut.contains(&indexed) && contains_name(indexed, start, cx) { . return; . } else { . format!(".skip({})", snippet(cx, start.span, "..")) . }; . . let mut end_is_start_plus_val = false; . 8 ( 0.00%) let take = if let Some(end) = *end { . let mut take_expr = end; . 4 ( 0.00%) if let ExprKind::Binary(ref op, left, right) = end.kind . && op.node == BinOpKind::Add . { . let ctxt = start.span.ctxt(); . let start_equal_left = SpanlessEq::new(cx).eq_expr(ctxt, start, left); . let start_equal_right = SpanlessEq::new(cx).eq_expr(ctxt, start, right); . . if start_equal_left { . take_expr = right; . } else if start_equal_right { . take_expr = left; . } . . end_is_start_plus_val = start_equal_left | start_equal_right; . } . 24 ( 0.00%) if is_len_call(end, indexed) || is_end_eq_array_len(cx, end, range_ty, indexed_ty) { 17 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/needless_range_loop.rs:clippy_lints::loops::needless_range_loop::is_len_call (2x) 8 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/needless_range_loop.rs:clippy_lints::loops::needless_range_loop::is_end_eq_array_len (2x) . String::new() 8 ( 0.00%) } else if visitor.indexed_mut.contains(&indexed) && contains_name(indexed, take_expr, cx) { 165 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::contains_name (1x) . return; . } else { . match range_ty.limits() { . ast::RangeLimits::Closed => { . let take_expr = sugg::Sugg::hir(cx, take_expr, ""); . format!(".take({})", take_expr + sugg::ONE) . }, . ast::RangeLimits::HalfOpen => { 6 ( 0.00%) format!(".take({})", snippet(cx, take_expr.span, "..")) . }, . } . } . } else { . String::new() . }; . 14 ( 0.00%) let (ref_mut, method) = if visitor.indexed_mut.contains(&indexed) { . ("mut ", "iter_mut") . } else { . ("", "iter") . }; . . let take_is_empty = take.is_empty(); 4 ( 0.00%) let mut method_1 = take; 5 ( 0.00%) let mut method_2 = skip; . 2 ( 0.00%) if end_is_start_plus_val { . mem::swap(&mut method_1, &mut method_2); . } . 1 ( 0.00%) let indexed_extended_snippet = snippet(cx, indexed_extended.expr.span, ".."); 7 ( 0.00%) span_lint_and_then( 513,295 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (1x) . cx, . NEEDLESS_RANGE_LOOP, . span, 2 ( 0.00%) if visitor.nonindex { 7 ( 0.00%) format!( . "the loop variable `{}` is used to index `{indexed_extended_snippet}`", . ident.name . ) . } else { . format!( . "the loop variable `{}` is only used to index `{indexed_extended_snippet}`", . ident.name . ) . }, 21 ( 0.00%) |diag| { 1 ( 0.00%) diag.span_note(indexed_span, "for this index operation"); 2 ( 0.00%) if visitor.nonindex { . diag.multipart_suggestion( . "consider using an iterator and enumerate()", 10 ( 0.00%) vec![ 8 ( 0.00%) (pat.span, format!("({}, )", ident.name)), . ( 1 ( 0.00%) span, 14 ( 0.00%) format!("{indexed_extended_snippet}.{method}().enumerate(){method_1}{method_2}"), . ), . ], . Applicability::HasPlaceholders, . ); . } else { . let repl = if starts_at_zero && take_is_empty { . format!("&{ref_mut}{indexed_extended_snippet}") . } else { -- line 183 ---------------------------------------- -- line 186 ---------------------------------------- . diag.multipart_suggestion( . "consider using an iterator", . vec![(pat.span, "".to_string()), (span, repl)], . Applicability::HasPlaceholders, . ); . } . }, . ); 2 ( 0.00%) } . } 1,408 ( 0.00%) } . 2 ( 0.00%) fn is_len_call(expr: &Expr<'_>, var: Symbol) -> bool { 8 ( 0.00%) if let ExprKind::MethodCall(method, recv, [], _) = expr.kind 1 ( 0.00%) && method.ident.name == sym::len 2 ( 0.00%) && let ExprKind::Path(QPath::Resolved(_, path)) = recv.kind . && path.segments.len() == 1 . && path.segments[0].ident.name == var . { . return true; . } . . false 2 ( 0.00%) } . . fn is_end_eq_array_len<'tcx>( . cx: &LateContext<'tcx>, . end: &Expr<'_>, . range_ty: higher::RangeTy, . indexed_ty: Ty<'tcx>, . ) -> bool { 4 ( 0.00%) if let ExprKind::Lit(lit) = end.kind . && let ast::LitKind::Int(end_int, _) = lit.node . && let ty::Array(_, arr_len_const) = indexed_ty.kind() . && let Some(arr_len) = arr_len_const.try_to_target_usize(cx.tcx) . { . return match range_ty.limits() { . ast::RangeLimits::Closed => end_int.get() + 1 >= arr_len.into(), . ast::RangeLimits::HalfOpen => end_int.get() >= arr_len.into(), . }; . } . . false 2 ( 0.00%) } . . #[expect(clippy::struct_excessive_bools)] . struct VarVisitor<'a, 'tcx> { . /// context reference . cx: &'a LateContext<'tcx>, . /// var name to look for as index . var: HirId, . /// indexed variables that are used mutably -- line 237 ---------------------------------------- -- line 252 ---------------------------------------- . /// an index op? . nonindex: bool, . /// Whether we are inside the `$` in `&mut $` or `$ = foo` or `$.bar`, where bar . /// takes `&mut self` . prefer_mutable: bool, . } . . impl<'tcx> VarVisitor<'_, 'tcx> { 261 ( 0.00%) fn check(&mut self, idx: &'tcx Expr<'_>, seqexpr: &'tcx Expr<'_>, expr: &'tcx Expr<'_>) -> bool { . let mut used_cnt = 0; . // It is `true` if all indices are direct . let mut index_used_directly = true; . . // Handle initial index 377 ( 0.00%) if is_local_used(self.cx, idx, self.var) { . used_cnt += 1; . index_used_directly &= matches!(idx.kind, ExprKind::Path(_)); . } . // Handle nested indices . // For example, in `a.b[0][i][i]`, we will have `nested_seqexpr` be `a.b[0]`, with the corresponding . // `nested_seqexpr_index_span` be the span of `a.b[0][i]`, and `seqexpr` be `a.b`. 29 ( 0.00%) let mut nested_seqexpr_index_span = expr.span; . let nested_seqexpr = peel_hir_expr_while(seqexpr, |e| { 58 ( 0.00%) if let ExprKind::Index(inner, idx, _) = e.kind . && is_local_used(self.cx, idx, self.var) . { . used_cnt += 1; . index_used_directly &= matches!(idx.kind, ExprKind::Path(_)); . nested_seqexpr_index_span = e.span; . Some(inner) . } else { . None . } . }); . let seqexpr = peel_hir_expr_while(nested_seqexpr, |e| { 135 ( 0.00%) if let ExprKind::Index(inner, _, _) | ExprKind::Field(inner, _) = e.kind { . Some(inner) . } else { . None . } . }); . 58 ( 0.00%) match used_cnt { . 0 => return true, 40 ( 0.00%) n if n > 1 => self.nonindex = true, // Optimize code like `a[i][i]` . _ => {}, . } . 140 ( 0.00%) if let ExprKind::Path(ref seqpath) = seqexpr.kind . // the indexed container is referenced by a name 75 ( 0.00%) && let QPath::Resolved(None, seqvar) = *seqpath 30 ( 0.00%) && seqvar.segments.len() == 1 . { 30 ( 0.00%) if self.prefer_mutable { 8 ( 0.00%) self.indexed_mut.insert(seqvar.segments[0].ident.name); . } 90 ( 0.00%) let res = self.cx.qpath_res(seqpath, seqexpr.hir_id); 345 ( 0.00%) => ???:::qpath_res (15x) 90 ( 0.00%) match res { 15 ( 0.00%) Res::Local(hir_id) => { 90 ( 0.00%) let parent_def_id = self.cx.tcx.hir_get_parent_item(expr.hir_id); 285 ( 0.00%) => ???:::hir_get_parent_item (15x) 30 ( 0.00%) let extent = self . .cx . .tcx . .region_scope_tree(parent_def_id) 15 ( 0.00%) .var_scope(hir_id.local_id) 840 ( 0.00%) => ???:::var_scope (15x) . .unwrap(); 49 ( 0.00%) if index_used_directly { . self.indexed_directly.insert( 44 ( 0.00%) ( 44 ( 0.00%) seqvar.segments[0].ident.name, . SpanlessExpr { 11 ( 0.00%) cx: self.cx, . expr: nested_seqexpr, 11 ( 0.00%) ctxt: seqexpr.span.ctxt(), . }, . ), 77 ( 0.00%) (Some(extent), nested_seqexpr_index_span), . ); . } else { . self.indexed_indirectly 16 ( 0.00%) .insert(seqvar.segments[0].ident.name, Some(extent)); . } . return false; // no need to walk further *on the variable* . }, . Res::Def(DefKind::Static { .. } | DefKind::Const { .. }, ..) => { . if index_used_directly { . self.indexed_directly.insert( . ( . seqvar.segments[0].ident.name, -- line 340 ---------------------------------------- -- line 357 ---------------------------------------- . if index_used_directly { . self.unnamed_indexed_directly = true; . } else { . self.unnamed_indexed_indirectly = true; . } . return false; . } . true 232 ( 0.00%) } . } . . impl<'tcx> Visitor<'tcx> for VarVisitor<'_, 'tcx> { 10,485 ( 0.00%) fn visit_expr(&mut self, expr: &'tcx Expr<'_>) { 11,650 ( 0.00%) if let ExprKind::MethodCall(meth, args_0, [args_1, ..], _) = &expr.kind 219 ( 0.00%) && let Some(trait_id) = self . .cx . .typeck_results() 219 ( 0.00%) .type_dependent_def_id(expr.hir_id) 1,377 ( 0.00%) => ???:::type_dependent_def_id (27x) 292 ( 0.00%) .and_then(|def_id| self.cx.tcx.trait_of_assoc(def_id)) 6,124 ( 0.00%) => ???:::trait_of_assoc (27x) 2 ( 0.00%) && ((meth.ident.name == sym::index && self.cx.tcx.lang_items().index_trait() == Some(trait_id)) 1 ( 0.00%) || (meth.ident.name == sym::index_mut && self.cx.tcx.lang_items().index_mut_trait() == Some(trait_id))) . && !self.check(args_1, args_0, expr) . { . return; . } . 2,242 ( 0.00%) if let ExprKind::Index(seqexpr, idx, _) = expr.kind . // an index op 29 ( 0.00%) && !self.check(idx, seqexpr, expr) . { . return; . } . 12,138 ( 0.00%) if let ExprKind::Path(QPath::Resolved(None, path)) = expr.kind . // directly using a variable 1,648 ( 0.00%) && let Res::Local(local_id) = path.res . { 427 ( 0.00%) if local_id == self.var { 48 ( 0.00%) self.nonindex = true; . } else { . // not the correct variable, but still a variable 1,324 ( 0.00%) self.referenced.insert(path.segments[0].ident.name); . } . } . 3,450 ( 0.00%) let old = self.prefer_mutable; 4,128 ( 0.00%) match expr.kind { 16 ( 0.00%) ExprKind::AssignOp(_, lhs, rhs) | ExprKind::Assign(lhs, rhs, _) => { 16 ( 0.00%) self.prefer_mutable = true; 64 ( 0.00%) self.visit_expr(lhs); 51,595 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/needless_range_loop.rs:::visit_expr'2 (9x) 16 ( 0.00%) self.prefer_mutable = false; 64 ( 0.00%) self.visit_expr(rhs); 10,662 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/needless_range_loop.rs:::visit_expr'2 (9x) . }, . ExprKind::AddrOf(BorrowKind::Ref, mutbl, expr) => { 89 ( 0.00%) if mutbl == Mutability::Mut { 22 ( 0.00%) self.prefer_mutable = true; . } . self.visit_expr(expr); . }, 109 ( 0.00%) ExprKind::Call(f, args) => { 218 ( 0.00%) self.visit_expr(f); 1,683 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/needless_range_loop.rs:::visit_expr'2 (9x) . for expr in args { 363 ( 0.00%) let ty = self.cx.typeck_results().expr_ty_adjusted(expr); 731 ( 0.00%) => ???:::expr_ty_adjusted (11x) 242 ( 0.00%) self.prefer_mutable = false; 251 ( 0.00%) if let ty::Ref(_, _, mutbl) = *ty.kind() 110 ( 0.00%) && mutbl == Mutability::Mut . { 18 ( 0.00%) self.prefer_mutable = true; . } 363 ( 0.00%) self.visit_expr(expr); 9,504 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/loops/needless_range_loop.rs:::visit_expr'2 (11x) . } . }, . ExprKind::MethodCall(_, receiver, args, _) => { 556 ( 0.00%) let def_id = self.cx.typeck_results().type_dependent_def_id(expr.hir_id).unwrap(); 1,734 ( 0.00%) => ???:::type_dependent_def_id (34x) . for (ty, expr) in iter::zip( 278 ( 0.00%) self.cx . .tcx . .fn_sig(def_id) . .instantiate_identity() . .skip_norm_wip() . .inputs() . .skip_binder(), . iter::once(receiver).chain(args.iter()), . ) { 744 ( 0.00%) self.prefer_mutable = false; 801 ( 0.00%) if let ty::Ref(_, _, mutbl) = *ty.kind() 310 ( 0.00%) && mutbl == Mutability::Mut . { 114 ( 0.00%) self.prefer_mutable = true; . } 496 ( 0.00%) self.visit_expr(expr); 327,872 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/loops/needless_range_loop.rs:::visit_expr'2 (78x) . } . }, . ExprKind::Closure(&Closure { body, .. }) => { . let body = self.cx.tcx.hir_body(body); . self.visit_expr(body.value); . }, 3,388 ( 0.00%) _ => walk_expr(self, expr), 255,914 ( 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 (51x) . } 1,150 ( 0.00%) self.prefer_mutable = old; 9,320 ( 0.00%) } . } . . struct SpanlessExpr<'cx, 'tcx> { . cx: &'cx LateContext<'tcx>, . expr: &'cx Expr<'tcx>, . ctxt: SyntaxContext, . } . . impl PartialEq for SpanlessExpr<'_, '_> { 20 ( 0.00%) fn eq(&self, other: &Self) -> bool { 5 ( 0.00%) let mut eq = SpanlessEq::new(self.cx); 30 ( 0.00%) eq.eq_expr(self.ctxt, self.expr, other.expr) 8,258 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::eq_expr (5x) 35 ( 0.00%) } . } . . impl Eq for SpanlessExpr<'_, '_> {} . . impl Hash for SpanlessExpr<'_, '_> { . fn hash(&self, state: &mut H) { 11 ( 0.00%) let mut hash = SpanlessHash::new(self.cx); 22 ( 0.00%) hash.hash_expr(self.expr); 6,174 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/hir_utils.rs:::hash_expr (11x) 11 ( 0.00%) state.write_u64(hash.finish()); . } . } 4,140 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 479 ( 0.00%) cx.type_is_copy_modulo_regions(ty) 1,221,301 ( 0.03%) => ???:::type_is_copy_modulo_regions (401x) . } . . /// 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, &[])) . } . . /// Checks whether a type can be partially moved. 18 ( 0.00%) pub fn can_partially_move_ty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool { 4 ( 0.00%) if has_drop(cx, ty) || is_copy(cx, ty) { . return false; . } 8 ( 0.00%) match ty.kind() { . ty::Param(_) => false, . ty::Adt(def, subs) => def . .all_fields() . .any(|f| !is_copy(cx, f.ty(cx.tcx, subs).skip_norm_wip())), . _ => true, . } 16 ( 0.00%) } . . /// Walks into `ty` and returns `true` if any inner type is an instance of the given adt . /// constructor. 1,902 ( 0.00%) pub fn contains_adt_constructor<'tcx>(ty: Ty<'tcx>, adt: AdtDef<'tcx>) -> bool { 634 ( 0.00%) ty.walk().any(|inner| match inner.kind() { 2,219 ( 0.00%) => ???:::walk (317x) . GenericArgKind::Type(inner_ty) => inner_ty.ty_adt_def() == Some(adt), . GenericArgKind::Lifetime(_) | GenericArgKind::Const(_) => false, . }) 1,268 ( 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`. 84 ( 0.00%) pub fn contains_ty_adt_constructor_opaque<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, needle: Ty<'tcx>) -> bool { 462 ( 0.00%) fn contains_ty_adt_constructor_opaque_inner<'tcx>( . cx: &LateContext<'tcx>, . ty: Ty<'tcx>, . needle: Ty<'tcx>, . seen: &mut FxHashSet, . ) -> bool { 42 ( 0.00%) ty.walk().any(|inner| match inner.kind() { 294 ( 0.00%) => ???:::walk (42x) . GenericArgKind::Type(inner_ty) => { 86 ( 0.00%) if inner_ty == needle { . return true; . } . 44 ( 0.00%) if inner_ty.ty_adt_def() == needle.ty_adt_def() { . return true; . } . . if let ty::Alias( . _, . AliasTy { . kind: ty::Opaque { def_id }, . .. -- line 114 ---------------------------------------- -- line 151 ---------------------------------------- . } . } . } . . false . }, . GenericArgKind::Lifetime(_) | GenericArgKind::Const(_) => false, . }) 378 ( 0.00%) } . . // A hash set to ensure that the same opaque type (`impl Trait` in RPIT or TAIT) is not . // visited twice. . let mut seen = FxHashSet::default(); 42 ( 0.00%) contains_ty_adt_constructor_opaque_inner(cx, ty, needle, &mut seen) 18,520 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::contains_ty_adt_constructor_opaque::contains_ty_adt_constructor_opaque_inner (42x) 126 ( 0.00%) } . . /// Resolves `::Item` for `T` . /// Do not invoke without first verifying that the type implements `Iterator` 30 ( 0.00%) pub fn get_iterator_item_ty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option> { 6 ( 0.00%) cx.tcx 12 ( 0.00%) .get_diagnostic_item(sym::Iterator) 636 ( 0.00%) => ???:::get_diagnostic_item (6x) 48 ( 0.00%) .and_then(|iter_did| cx.get_associated_type(ty, iter_did, sym::Item)) 151,056 ( 0.00%) => ???:::get_associated_type (6x) . } . . /// Returns true if `ty` is a type on which calling `Clone` through a function instead of . /// as a method, such as `Arc::clone()` is considered idiomatic. . /// . /// Lints should avoid suggesting to replace instances of `ty::Clone()` by `.clone()` for objects . /// of those types. . pub fn should_call_clone_as_function(cx: &LateContext<'_>, ty: Ty<'_>) -> bool { . matches!( . ty.opt_diag_name(cx), . Some(sym::Arc | sym::ArcWeak | sym::Rc | sym::RcWeak) . ) . } . . /// If `ty` is known to have a `iter` or `iter_mut` method, returns a symbol representing the type. 20 ( 0.00%) pub fn has_iter_method(cx: &LateContext<'_>, probably_ref_ty: Ty<'_>) -> Option { . // FIXME: instead of this hard-coded list, we should check if `::iter` . // exists and has the desired signature. Unfortunately FnCtxt is not exported . // so we can't use its `lookup_method` method. . let into_iter_collections: &[Symbol] = &[ . sym::Vec, . sym::Option, . sym::Result, . sym::BTreeMap, -- line 196 ---------------------------------------- -- line 201 ---------------------------------------- . sym::HashSet, . sym::HashMap, . sym::PathBuf, . sym::Path, . sym::MpscReceiver, . sym::MpmcReceiver, . ]; . 8 ( 0.00%) let ty_to_check = match probably_ref_ty.kind() { . ty::Ref(_, ty_to_check, _) => *ty_to_check, . _ => probably_ref_ty, . }; . 28 ( 0.00%) let def_id = match ty_to_check.kind() { . ty::Array(..) => return Some(sym::array), . ty::Slice(..) => return Some(sym::slice), 4 ( 0.00%) ty::Adt(adt, _) => adt.did(), . _ => return None, . }; . . for &name in into_iter_collections { 28 ( 0.00%) if cx.tcx.is_diagnostic_item(name, def_id) { 412 ( 0.00%) => ???:::is_diagnostic_item (4x) . return Some(cx.tcx.item_name(def_id)); . } . } . None 28 ( 0.00%) } . . /// 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 15,301 ( 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( 2,354 ( 0.00%) cx.tcx, 1,177 ( 0.00%) cx.typing_env(), 34,959 ( 0.00%) => ???:::typing_env (1,177x) . ty, . trait_id, . None, . args.iter().map(|&x| Some(x)), . ) 9,416 ( 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. 4,634 ( 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))) 5,296 ( 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 1,839 ( 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. 1,324 ( 0.00%) if let Some(callee_id) = callee_id { 1,986 ( 0.00%) let _ = tcx.hir_body_owner_kind(callee_id); 65,730 ( 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:: (662x) . } . . let ty = tcx.erase_and_anonymize_regions(ty); 1,839 ( 0.00%) if ty.has_escaping_bound_vars() { . return false; . } . 14,197 ( 0.00%) let (infcx, param_env) = tcx.infer_ctxt().build_with_typing_env(typing_env); 82,750 ( 0.00%) => ???:0x0000000000173dc0 (662x) 74,144 ( 0.00%) => ???:::build_with_typing_env (662x) . 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); . 15,889 ( 0.00%) let obligation = Obligation { . cause: ObligationCause::dummy(), . param_env, . recursion_depth: 0, . predicate: trait_ref.upcast(tcx), . }; . infcx 1,839 ( 0.00%) .evaluate_obligation(&obligation) 4,742,962 ( 0.13%) => ???:::evaluate_obligation (662x) . .is_ok_and(EvaluationResult::must_apply_modulo_regions) 1,839 ( 0.00%) } 165,500 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue:: (662x) . . /// 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`]. 1,545 ( 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. 3,090 ( 0.00%) let dummy_expr = Expr { 515 ( 0.00%) hir_id: cx.last_node_with_lint_attrs, . span: DUMMY_SP, . kind: ExprKind::Ret(None), . }; 1,545 ( 0.00%) match is_ty_must_use(cx, ty, &dummy_expr) { 3,862,413 ( 0.11%) => ???:rustc_lint::unused::must_use::is_ty_must_use (515x) 192 ( 0.00%) IsTyMustUse::Yes(path) => Some(path), 467 ( 0.00%) _ => None, . } 2,060 ( 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 432 ---------------------------------------- . } . . /// Returns `true` if the given type is a non aggregate primitive (a `bool` or `char`, any . /// integer or floating-point number type). . /// . /// For checking aggregation of primitive types (e.g. tuples and slices of primitive type) see . /// `is_recursively_primitive_type` . pub fn is_non_aggregate_primitive_type(ty: Ty<'_>) -> bool { 24 ( 0.00%) matches!(ty.kind(), ty::Bool | ty::Char | ty::Int(_) | ty::Uint(_) | ty::Float(_)) . } . . /// Returns `true` if the given type is a primitive (a `bool` or `char`, any integer or . /// floating-point number type, a `str`, or an array, slice, or tuple of those types). 6 ( 0.00%) pub fn is_recursively_primitive_type(ty: Ty<'_>) -> bool { 6 ( 0.00%) match *ty.kind() { . ty::Bool | ty::Char | ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::Str => true, . ty::Ref(_, inner, _) if inner.is_str() => true, . 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, . } 6 ( 0.00%) } . . /// Return `true` if the passed `typ` is `isize` or `usize`. . pub fn is_isize_or_usize(typ: Ty<'_>) -> bool { 97 ( 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. 32 ( 0.00%) pub fn needs_ordered_drop<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool { 160 ( 0.00%) fn needs_ordered_drop_inner<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, seen: &mut FxHashSet>) -> bool { 32 ( 0.00%) if !seen.insert(ty) { . return false; . } 87 ( 0.00%) if !ty.has_significant_drop(cx.tcx, cx.typing_env()) { 480 ( 0.00%) => ???:::typing_env (16x) . false . } . // Check for std types which implement drop, but only for memory allocation. . else if ty.is_lang_item(cx, LangItem::OwnedBox) . || matches!( . ty.opt_diag_name(cx), . Some(sym::HashSet | sym::Rc | sym::Arc | sym::cstring_type | sym::RcWeak | sym::ArcWeak) . ) -- line 477 ---------------------------------------- -- line 497 ---------------------------------------- . .all_fields() . .map(|f| f.ty(cx.tcx, subs).skip_norm_wip()) . .any(|ty| needs_ordered_drop_inner(cx, ty, seen)), . _ => true, . } . } else { . true . } 128 ( 0.00%) } . 16 ( 0.00%) needs_ordered_drop_inner(cx, ty, &mut FxHashSet::default()) 143,527 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::needs_ordered_drop::needs_ordered_drop_inner (16x) 48 ( 0.00%) } . . /// 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. 554 ( 0.00%) pub fn peel_and_count_ty_refs(mut ty: Ty<'_>) -> (Ty<'_>, usize, Option) { . let mut count = 0; . let mut mutbl = None; 1,386 ( 0.00%) while let ty::Ref(_, dest_ty, m) = ty.kind() { 139 ( 0.00%) ty = *dest_ty; 139 ( 0.00%) count += 1; . mutbl.replace(mutbl.map_or(*m, |mutbl: Mutability| mutbl.min(*m))); . } 1,662 ( 0.00%) (ty, count, mutbl) 554 ( 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` 2,261 ( 0.00%) pub fn same_type_modulo_regions<'tcx>(a: Ty<'tcx>, b: Ty<'tcx>) -> bool { 2,162 ( 0.00%) match (a.kind(), b.kind()) { . (ty::Adt(did_a, args_a), ty::Adt(did_b, args_b)) => { 105 ( 0.00%) if did_a != did_b { . return false; . } . 10 ( 0.00%) 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)) => { 12 ( 0.00%) same_type_modulo_regions(type_a, type_b) 136 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::same_type_modulo_regions'2 (2x) . }, . _ => 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, . } 1,938 ( 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 696 ---------------------------------------- . pub enum ExprFnSig<'tcx> { . Sig(Binder<'tcx, FnSig<'tcx>>, Option), . Closure(Option<&'tcx FnDecl<'tcx>>, Binder<'tcx, FnSig<'tcx>>), . Trait(Binder<'tcx, Ty<'tcx>>, Option>>, Option), . } . impl<'tcx> ExprFnSig<'tcx> { . /// Gets the argument type at the given offset. This will return `None` when the index is out of . /// bounds only for variadic functions, otherwise this will panic. 10 ( 0.00%) pub fn input(self, i: usize) -> Option>> { 10 ( 0.00%) match self { 4 ( 0.00%) Self::Sig(sig, _) => { 2 ( 0.00%) if sig.c_variadic() { . sig.inputs().map_bound(|inputs| inputs.get(i).copied()).transpose() . } else { . Some(sig.input(i)) . } . }, . 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])), . } 12 ( 0.00%) } . . /// 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. 4,120 ( 0.00%) pub fn input_with_hir(self, i: usize) -> Option<(Option<&'tcx hir::Ty<'tcx>>, Binder<'tcx, Ty<'tcx>>)> { 2,563 ( 0.00%) match self { 986 ( 0.00%) Self::Sig(sig, _) => { 493 ( 0.00%) if sig.c_variadic() { . sig.inputs() . .map_bound(|inputs| inputs.get(i).copied()) . .transpose() . .map(|arg| (None, arg)) . } else { . Some((None, sig.input(i))) . } . }, 12 ( 0.00%) Self::Closure(decl, sig) => Some(( . decl.and_then(|decl| decl.inputs.get(i)), 30 ( 0.00%) sig.input(0).map_bound(|ty| ty.tuple_fields()[i]), 6 ( 0.00%) )), 128 ( 0.00%) Self::Trait(inputs, _, _) => Some((None, inputs.map_bound(|ty| ty.tuple_fields()[i]))), . } 4,120 ( 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 { 1,057 ( 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. 4,128 ( 0.00%) pub fn expr_sig<'tcx>(cx: &LateContext<'tcx>, expr: &Expr<'_>) -> Option> { 5,139 ( 0.00%) if let Res::Def(DefKind::Fn | DefKind::Ctor(_, CtorKind::Fn) | DefKind::AssocFn, id) = expr.res(cx) { 3,458 ( 0.00%) Some(ExprFnSig::Sig( 494 ( 0.00%) cx.tcx.fn_sig(id).instantiate_identity().skip_norm_wip(), . Some(id), . )) . } else { 132 ( 0.00%) ty_sig(cx, cx.typeck_results().expr_ty_adjusted(expr).peel_refs()) 10,102 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::ty_sig (22x) 1,166 ( 0.00%) => ???:::expr_ty_adjusted (22x) . } 4,622 ( 0.00%) } . . /// If the type is function like, get the signature for it. 253 ( 0.00%) pub fn ty_sig<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> Option> { 92 ( 0.00%) if let Some(boxed_ty) = ty.boxed_ty() { 138 ( 0.00%) => ???:::boxed_ty (23x) . return ty_sig(cx, boxed_ty); . } 184 ( 0.00%) match *ty.kind() { 18 ( 0.00%) ty::Closure(id, subs) => { . let decl = id . .as_local() 36 ( 0.00%) .and_then(|id| cx.tcx.hir_fn_decl_by_hir_id(cx.tcx.local_def_id_to_hir_id(id))); 450 ( 0.00%) => ???:::hir_fn_decl_by_hir_id (6x) 36 ( 0.00%) Some(ExprFnSig::Closure(decl, subs.as_closure().sig())) 6 ( 0.00%) }, 7 ( 0.00%) ty::FnDef(id, subs) => Some(ExprFnSig::Sig( 1 ( 0.00%) cx.tcx . .fn_sig(id) . .instantiate(cx.tcx, subs.no_bound_vars().unwrap()) . .skip_norm_wip(), . Some(id), 1 ( 0.00%) )), . ty::Alias( . _, . AliasTy { . kind: ty::Opaque { def_id }, . args, . .. . }, . ) => sig_from_bounds( -- line 797 ---------------------------------------- -- 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)), . }, 48 ( 0.00%) ty::Param(_) => sig_from_bounds(cx, ty, cx.param_env.caller_bounds(), None), . _ => None, . } 223 ( 0.00%) } . 160 ( 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; 48 ( 0.00%) let lang_items = cx.tcx.lang_items(); 640 ( 0.00%) => ???:::lang_items (16x) . . for clause in clauses { 472 ( 0.00%) match clause.kind().skip_binder() { 1,232 ( 0.00%) => ???:::kind (88x) . ty::ClauseKind::Trait(p) 2 ( 0.00%) if (lang_items.fn_trait() == Some(p.def_id()) 16 ( 0.00%) || lang_items.fn_mut_trait() == Some(p.def_id()) 16 ( 0.00%) || lang_items.fn_once_trait() == Some(p.def_id())) 34 ( 0.00%) && p.self_ty() == ty => . { 102 ( 0.00%) let i = clause.kind().rebind(p.trait_ref.args.type_at(1)); 476 ( 0.00%) => ???:::kind (34x) . if inputs.is_some_and(|inputs| i != inputs) { . // Multiple different fn trait impls. Is this even allowed? . return None; . } . inputs = Some(i); . }, 160 ( 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 => . { 16 ( 0.00%) if output.is_some() { . // Multiple different fn trait impls. Is this even allowed? . return None; . } 96 ( 0.00%) output = Some(clause.kind().rebind(p.term.expect_type())); 224 ( 0.00%) => ???:::kind (16x) 80 ( 0.00%) => ???:::expect_type (16x) . }, . _ => (), . } . } . . inputs.map(|ty| ExprFnSig::Trait(ty, output, predicates_id)) 128 ( 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. 288 ( 0.00%) pub fn read_explicit_enum_value(tcx: TyCtxt<'_>, id: DefId) -> Option { 144 ( 0.00%) if let Ok(ConstValue::Scalar(Scalar::Int(value))) = tcx.const_eval_poly(id) { 9,552 ( 0.00%) => ???:::const_eval_poly (24x) 72 ( 0.00%) match tcx.type_of(id).instantiate_identity().skip_norm_wip().kind() { 120 ( 0.00%) ty::Int(_) => Some(EnumValue::Signed(value.to_int(value.size()))), . ty::Uint(_) => Some(EnumValue::Unsigned(value.to_uint(value.size()))), . _ => None, . } . } else { . None . } 216 ( 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 { 14 ( 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 . } 7 ( 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 126 ( 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() . .enumerate() 1,043 ( 0.00%) .map(|(i, f)| (i, approx_ty_size(cx, f.ty(cx.tcx, subst).skip_norm_wip()))) 2,194,419 ( 0.06%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::approx_ty_size (149x) 52,489 ( 0.00%) => ???:::ty (149x) . .collect::>(); . fields_size.sort_by_key(|(_, a_size)| *a_size); . . Self { . ind: i, . size: fields_size.iter().map(|(_, size)| size).sum(), 656 ( 0.00%) fields_size, . } . }) . .collect::>(); . variants_size.sort_by_key(|b| std::cmp::Reverse(b.size)); 168 ( 0.00%) variants_size 168 ( 0.00%) } . } . . /// Gets the struct or enum variant from the given `Res` 63 ( 0.00%) pub fn adt_and_variant_of_res<'tcx>(cx: &LateContext<'tcx>, res: Res) -> Option<(AdtDef<'tcx>, &'tcx VariantDef)> { 108 ( 0.00%) match res { 18 ( 0.00%) Res::Def(DefKind::Struct, id) => { 9 ( 0.00%) let adt = cx.tcx.adt_def(id); . Some((adt, adt.non_enum_variant())) . }, . Res::Def(DefKind::Variant, id) => { . let adt = cx.tcx.adt_def(cx.tcx.parent(id)); . Some((adt, adt.variant_with_id(id))) . }, . Res::Def(DefKind::Ctor(CtorOf::Struct, _), id) => { . let adt = cx.tcx.adt_def(cx.tcx.parent(id)); -- line 1050 ---------------------------------------- -- line 1062 ---------------------------------------- . .instantiate_identity() . .skip_norm_wip() . .ty_adt_def() . .unwrap(); . Some((adt, adt.non_enum_variant())) . }, . _ => None, . } 81 ( 0.00%) } . . /// Comes up with an "at least" guesstimate for the type's size, not taking into . /// account the layout of type parameters. 5,819 ( 0.00%) pub fn approx_ty_size<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> u64 { . use rustc_middle::ty::layout::LayoutOf as _; 535 ( 0.00%) match (cx.layout_of(ty).map(|layout| layout.size.bytes()), ty.kind()) { 528 ( 0.00%) (Ok(size), _) => size, . (Err(_), ty::Tuple(list)) => list.iter().map(|t| approx_ty_size(cx, t)).sum(), . (Err(_), ty::Array(t, n)) => n.try_to_target_usize(cx.tcx).unwrap_or_default() * approx_ty_size(cx, *t), . (Err(_), ty::Adt(def, subst)) if def.is_struct() => def . .variants() . .iter() . .map(|v| { . v.fields . .iter() -- line 1085 ---------------------------------------- -- line 1107 ---------------------------------------- . .map(|field| approx_ty_size(cx, field.ty(cx.tcx, subst).skip_norm_wip())) . .max() . .unwrap_or_default() . }) . .max() . .unwrap_or_default(), . (Err(_), _) => 0, . } 4,761 ( 0.00%) } . . #[cfg(debug_assertions)] . /// Asserts that the given arguments match the generic parameters of the given item. . fn assert_generic_args_match<'tcx>(tcx: TyCtxt<'tcx>, did: DefId, args: &[GenericArg<'tcx>]) { . use itertools::Itertools as _; . let g = tcx.generics_of(did); . let parent = g.parent.map(|did| tcx.generics_of(did)); . let count = g.parent_count + g.own_params.len(); -- line 1123 ---------------------------------------- -- line 1160 ---------------------------------------- . param.descr(), . params.clone().map(ty::GenericParamDefKind::descr).format(", "), . ); . } . } . . /// Returns whether `ty` is never-like; i.e., `!` (never) or an enum with zero variants. . pub fn is_never_like(ty: Ty<'_>) -> bool { 411 ( 0.00%) ty.is_never() || (ty.is_enum() && ty.ty_adt_def().is_some_and(|def| def.variants().is_empty())) . } . . /// Makes the projection type for the named associated type in the given impl or trait impl. . /// . /// This function is for associated types which are "known" to exist, and as such, will only return . /// `None` when debug assertions are disabled in order to prevent ICE's. With debug assertions . /// enabled this will check that the named associated type exists, the correct number of . /// arguments are given, and that the correct kinds of arguments are given (lifetime, . /// constant or type). This will not check if type normalization would succeed. . pub fn make_projection<'tcx>( . tcx: TyCtxt<'tcx>, . container_id: DefId, . assoc_ty: Symbol, . args: impl IntoIterator>>, . ) -> Option> { 8,806 ( 0.00%) fn helper<'tcx>( . tcx: TyCtxt<'tcx>, . container_id: DefId, . assoc_ty: Symbol, . args: GenericArgsRef<'tcx>, . ) -> Option> { 5,032 ( 0.00%) let Some(assoc_item) = tcx.associated_items(container_id).find_by_ident_and_kind( 240,694 ( 0.01%) => ???:::find_by_ident_and_kind (629x) . tcx, . Ident::with_dummy_span(assoc_ty), . AssocTag::Type, . container_id, . ) else { . debug_assert!(false, "type `{assoc_ty}` not found in `{container_id:?}`"); . return None; . }; . #[cfg(debug_assertions)] . assert_generic_args_match(tcx, assoc_item.def_id, args); . 3,774 ( 0.00%) let kind = if let DefKind::Impl { of_trait: false } = tcx.def_kind(tcx.parent(assoc_item.def_id)) { . ty::AliasTyKind::Inherent { . def_id: assoc_item.def_id, . } . } else { . ty::AliasTyKind::Projection { . def_id: assoc_item.def_id, . } . }; . 2,516 ( 0.00%) Some(AliasTy::new_from_args(tcx, kind, args)) 5,032 ( 0.00%) } 4,368 ( 0.00%) helper( 443,467 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::make_projection::helper (594x) . tcx, . container_id, . assoc_ty, . tcx.mk_args_from_iter(args.into_iter().map(Into::into)), . ) . } . . /// Normalizes the named associated type in the given impl or trait impl. . /// . /// This function is for associated types which are "known" to be valid with the given . /// arguments, and as such, will only return `None` when debug assertions are disabled in order . /// to prevent ICE's. With debug assertions enabled this will check that type normalization . /// succeeds as well as everything checked by `make_projection`. 132 ( 0.00%) pub fn make_normalized_projection<'tcx>( . tcx: TyCtxt<'tcx>, . typing_env: ty::TypingEnv<'tcx>, . container_id: DefId, . assoc_ty: Symbol, . args: impl IntoIterator>>, . ) -> Option> { 3,030 ( 0.00%) fn helper<'tcx>(tcx: TyCtxt<'tcx>, typing_env: ty::TypingEnv<'tcx>, ty: AliasTy<'tcx>) -> Option> { . #[cfg(debug_assertions)] . if let Some((i, arg)) = ty . .args . .iter() . .enumerate() . .find(|(_, arg)| arg.has_escaping_bound_vars()) . { . debug_assert!( . false, . "args contain late-bound region at index `{i}` which can't be normalized.\n\ . use `TyCtxt::instantiate_bound_regions_with_erased`\n\ . note: arg is `{arg:#?}`", . ); . return None; . } 1,212 ( 0.00%) match tcx.try_normalize_erasing_regions( . typing_env, . Unnormalized::new_wip(Ty::new_alias(tcx, ty::IsRigid::No, ty)), . ) { . Ok(ty) => Some(ty), . Err(e) => { . debug_assert!(false, "failed to normalize type `{ty}`: {e:#?}"); . None . }, . } 2,424 ( 0.00%) } 3,006 ( 0.00%) helper(tcx, typing_env, make_projection(tcx, container_id, assoc_ty, args)?) 2,284,834 ( 0.06%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::make_normalized_projection::helper (594x) 690 ( 0.00%) } . . /// Helper to check if given type has inner mutability such as [`std::cell::Cell`] or . /// [`std::cell::RefCell`]. . #[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)) 29,700 ( 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>> { 56 ( 0.00%) self.interior_mut_ty_chain_inner(cx, ty, 0) 9,509 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:::interior_mut_ty_chain_inner (16x) . } . 1,166 ( 0.00%) fn interior_mut_ty_chain_inner( . &mut self, . cx: &LateContext<'tcx>, . ty: Ty<'tcx>, . depth: usize, . ) -> Option<&'tcx ty::List>> { 424 ( 0.00%) if !cx.tcx.recursion_limit().value_within_limit(depth) { 1,120 ( 0.00%) => ???:::recursion_limit (28x) . return None; . } . . match self.tys.entry(ty) { 49 ( 0.00%) Entry::Occupied(o) => return *o.get(), . // Temporarily insert a `None` to break cycles . Entry::Vacant(v) => v.insert(None), . }; 114 ( 0.00%) let depth = depth + 1; . 429 ( 0.00%) let chain = match *ty.kind() { . ty::RawPtr(inner_ty, _) if !self.ignore_pointers => self.interior_mut_ty_chain_inner(cx, inner_ty, depth), 7 ( 0.00%) ty::Ref(_, inner_ty, _) | ty::Slice(inner_ty) => self.interior_mut_ty_chain_inner(cx, inner_ty, depth), 6 ( 0.00%) ty::Array(inner_ty, size) if size.try_to_target_usize(cx.tcx) != Some(0) => { . self.interior_mut_ty_chain_inner(cx, inner_ty, depth) . }, . ty::Tuple(fields) => fields . .iter() . .find_map(|ty| self.interior_mut_ty_chain_inner(cx, ty, depth)), 72 ( 0.00%) ty::Adt(def, _) if def.is_unsafe_cell() => Some(ty::List::empty()), 36 ( 0.00%) ty::Adt(def, args) => { 186 ( 0.00%) let is_std_collection = matches!( 36 ( 0.00%) cx.tcx.get_diagnostic_name(def.did()), 367 ( 0.00%) => ???:::get_diagnostic_name (5x) . Some( . sym::LinkedList . | sym::Vec . | sym::VecDeque . | sym::BTreeMap . | sym::BTreeSet . | sym::HashMap . | sym::HashSet . | sym::Arc . | sym::Rc . ) . ); . 30 ( 0.00%) if is_std_collection || def.is_box() { . // Include the types from std collections that are behind pointers internally . args.types() 48 ( 0.00%) .find_map(|ty| self.interior_mut_ty_chain_inner(cx, ty, depth)) 5,555 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:::interior_mut_ty_chain_inner'2 (12x) 90 ( 0.00%) } else if self.ignored_def_ids.contains(&def.did()) || def.is_phantom_data() { . None . } else { . def.all_fields() 448 ( 0.00%) .find_map(|f| self.interior_mut_ty_chain_inner(cx, f.ty(cx.tcx, args).skip_norm_wip(), depth)) 24,531 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:::interior_mut_ty_chain_inner'2 (14x) 5,991 ( 0.00%) => ???:::ty (14x) . } . }, . ty::Alias( . _, . AliasTy { . kind: ty::Projection { .. }, . .. . }, . ) => match cx . .tcx . .try_normalize_erasing_regions(cx.typing_env(), Unnormalized::new_wip(ty)) . { . Ok(normalized_ty) if ty != normalized_ty => self.interior_mut_ty_chain_inner(cx, normalized_ty, depth), . _ => None, 46 ( 0.00%) }, . _ => None, . }; . . chain.map(|chain| { . let list = cx.tcx.mk_type_list_from_iter(chain.iter().chain([ty])); . self.tys.insert(ty, Some(list)); . list . }) 954 ( 0.00%) } . . /// Check if given type has interior mutability such as [`std::cell::Cell`] or . /// [`std::cell::RefCell`] etc. 12 ( 0.00%) pub fn is_interior_mut_ty(&mut self, cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool { . self.interior_mut_ty_chain(cx, ty).is_some() 24 ( 0.00%) } . } . . pub fn make_normalized_projection_with_regions<'tcx>( . tcx: TyCtxt<'tcx>, . typing_env: ty::TypingEnv<'tcx>, . container_id: DefId, . assoc_ty: Symbol, . args: impl IntoIterator>>, . ) -> Option> { 184 ( 0.00%) fn helper<'tcx>(tcx: TyCtxt<'tcx>, typing_env: ty::TypingEnv<'tcx>, ty: AliasTy<'tcx>) -> Option> { . #[cfg(debug_assertions)] . if let Some((i, arg)) = ty . .args . .iter() . .enumerate() . .find(|(_, arg)| arg.has_escaping_bound_vars()) . { . debug_assert!( -- line 1401 ---------------------------------------- -- line 1402 ---------------------------------------- . false, . "args contain late-bound region at index `{i}` which can't be normalized.\n\ . use `TyCtxt::instantiate_bound_regions_with_erased`\n\ . note: arg is `{arg:#?}`", . ); . return None; . } . let cause = ObligationCause::dummy(); 138 ( 0.00%) let (infcx, param_env) = tcx.infer_ctxt().build_with_typing_env(typing_env); 2,875 ( 0.00%) => ???:0x0000000000173dc0 (23x) 2,576 ( 0.00%) => ???:::build_with_typing_env (23x) 46 ( 0.00%) match infcx . .at(&cause, param_env) 46 ( 0.00%) .query_normalize(Ty::new_alias(tcx, ty::IsRigid::No, ty)) 205,345 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_trait_selection/src/traits/query/normalize.rs:::query_normalize:: (23x) . { 69 ( 0.00%) Ok(ty) => Some(ty.value), . Err(e) => { . debug_assert!(false, "failed to normalize type `{ty}`: {e:#?}"); . None . }, . } 184 ( 0.00%) } 5,750 ( 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) 46 ( 0.00%) helper(tcx, typing_env, make_projection(tcx, container_id, assoc_ty, args)?) 220,960 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::make_normalized_projection_with_regions::helper (23x) . } . 138 ( 0.00%) pub fn normalize_with_regions<'tcx>(tcx: TyCtxt<'tcx>, typing_env: ty::TypingEnv<'tcx>, ty: Ty<'tcx>) -> Ty<'tcx> { . let cause = ObligationCause::dummy(); 138 ( 0.00%) let (infcx, param_env) = tcx.infer_ctxt().build_with_typing_env(typing_env); 2,731 ( 0.00%) => ???:0x0000000000173dc0 (23x) 2,576 ( 0.00%) => ???:::build_with_typing_env (23x) . infcx . .at(&cause, param_env) 46 ( 0.00%) .query_normalize(ty) 966 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_trait_selection/src/traits/query/normalize.rs:::query_normalize:: (23x) 23 ( 0.00%) .map_or(ty, |ty| ty.value) 161 ( 0.00%) } 5,750 ( 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) . . /// 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| { 3,336 ( 0.00%) if let Some(deref_did) = cx.tcx.lang_items().deref_trait() 33,360 ( 0.00%) => ???:::lang_items (834x) 9,174 ( 0.00%) && implements_trait(cx, ty, deref_did, &[]) 3,487,201 ( 0.10%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::implements_trait (834x) . { 1,188 ( 0.00%) make_normalized_projection(cx.tcx, cx.typing_env(), deref_did, sym::Target, [ty]) 17,820 ( 0.00%) => ???:::typing_env (594x) . } else { . None . } . }) . } . . /// Checks if a Ty<'_> has some inherent method Symbol. . /// . /// This does not look for impls in the type's `Deref::Target` type. . /// If you need this, you should wrap this call in `clippy_utils::ty::deref_chain().any(...)`. 1,184 ( 0.00%) pub fn get_adt_inherent_method<'a>(cx: &'a LateContext<'_>, ty: Ty<'_>, method_name: Symbol) -> Option<&'a AssocItem> { . let ty_did = ty.ty_adt_def().map(AdtDef::did)?; 144 ( 0.00%) cx.tcx.inherent_impls(ty_did).iter().find_map(|&did| { . cx.tcx . .associated_items(did) 3,912 ( 0.00%) .filter_by_name_unhygienic(method_name) 86,505 ( 0.00%) => ???:::filter_by_name_unhygienic (1,304x) . .next() . .filter(|item| item.tag() == AssocTag::Fn) . }) 1,184 ( 0.00%) } . . /// Gets the type of a field by name. . pub fn get_field_by_name<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, name: Symbol) -> Option> { . match *ty.kind() { . ty::Adt(def, args) if def.is_union() || def.is_struct() => def . .non_enum_variant() . .fields . .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, . } . } . 4,102 ( 0.00%) pub fn get_field_def_id_by_name(ty: Ty<'_>, name: Symbol) -> Option { 8,204 ( 0.00%) let ty::Adt(adt_def, ..) = ty.kind() else { return None }; 3,870 ( 0.00%) adt_def . .all_fields() . .find_map(|field| if field.name == name { Some(field.did) } else { None }) 4,102 ( 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> { 2,316 ( 0.00%) match *ty.kind() { . ty::Adt(adt, args) 2,586 ( 0.00%) if let [arg] = &**args 310 ( 0.00%) && let Some(arg) = arg.as_type() 513 ( 0.00%) && adt.is_diag_item(cx, sym::Option) => . { . Some(arg) . }, . _ => None, . } 1,158 ( 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, . } . } . . /// Check if a Ty<'_> of `Iterator` contains any mutable access to non-owning types by checking if . /// it contains fields of mutable references or pointers, or references/pointers to non-`Freeze` . /// types, or `PhantomData` types containing any of the previous. This can be used to check whether . /// skipping iterating over an iterator will change its behavior. 39 ( 0.00%) pub fn has_non_owning_mutable_access<'tcx>(cx: &LateContext<'tcx>, iter_ty: Ty<'tcx>) -> bool { . fn normalize_ty<'tcx>(cx: &LateContext<'tcx>, ty: Unnormalized<'tcx, Ty<'tcx>>) -> Ty<'tcx> { . cx.tcx 336 ( 0.00%) .try_normalize_erasing_regions(cx.typing_env(), ty) 750 ( 0.00%) => ???:::typing_env (25x) . .unwrap_or(ty.skip_norm_wip()) . } . . /// Check if `ty` contains mutable references or equivalent, which includes: . /// - A mutable reference/pointer. . /// - A reference/pointer to a non-`Freeze` type. . /// - A `PhantomData` type containing any of the previous. 1,551 ( 0.00%) fn has_non_owning_mutable_access_inner<'tcx>( . cx: &LateContext<'tcx>, . phantoms: &mut FxHashSet>, . ty: Ty<'tcx>, . ) -> bool { 1,149 ( 0.00%) match ty.kind() { 162 ( 0.00%) ty::Adt(adt_def, args) if adt_def.is_phantom_data() => { 28 ( 0.00%) phantoms.insert(ty) 11 ( 0.00%) && args . .types() 33 ( 0.00%) .any(|arg_ty| has_non_owning_mutable_access_inner(cx, phantoms, arg_ty)) 2,044 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::has_non_owning_mutable_access::has_non_owning_mutable_access_inner'2 (11x) . }, . ty::Adt(adt_def, args) => adt_def.all_fields().any(|field| { 896 ( 0.00%) has_non_owning_mutable_access_inner(cx, phantoms, normalize_ty(cx, field.ty(cx.tcx, args))) 167,871 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::has_non_owning_mutable_access::has_non_owning_mutable_access_inner'2 (25x) 17,503 ( 0.00%) => ???:::ty (25x) . }), 1 ( 0.00%) ty::Array(elem_ty, _) | ty::Slice(elem_ty) => has_non_owning_mutable_access_inner(cx, phantoms, *elem_ty), . ty::RawPtr(pointee_ty, mutability) | ty::Ref(_, pointee_ty, mutability) => { 289 ( 0.00%) mutability.is_mut() || !pointee_ty.is_freeze(cx.tcx, cx.typing_env()) 63,689 ( 0.00%) => ???:::is_freeze (20x) 600 ( 0.00%) => ???:::typing_env (20x) . }, . ty::Closure(_, closure_args) => { 8 ( 0.00%) matches!(closure_args.types().next_back(), . Some(captures) if has_non_owning_mutable_access_inner(cx, phantoms, captures)) . }, 10 ( 0.00%) ty::Tuple(tuple_args) => tuple_args . .iter() 15 ( 0.00%) .any(|arg_ty| has_non_owning_mutable_access_inner(cx, phantoms, arg_ty)), 18,605 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::has_non_owning_mutable_access::has_non_owning_mutable_access_inner'2 (5x) . _ => false, . } 1,128 ( 0.00%) } . . let mut phantoms = FxHashSet::default(); 13 ( 0.00%) has_non_owning_mutable_access_inner(cx, &mut phantoms, iter_ty) 187,407 ( 0.01%) => site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::has_non_owning_mutable_access::has_non_owning_mutable_access_inner (13x) 39 ( 0.00%) } . . /// Check if `ty` is slice-like, i.e., `&[T]`, `[T; N]`, or `Vec`. . pub fn is_slice_like<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool { 5 ( 0.00%) ty.is_slice() || ty.is_array() || ty.is_diag_item(cx, sym::Vec) 1 ( 0.00%) } . . pub fn get_field_idx_by_name(ty: Ty<'_>, name: Symbol) -> Option { . match *ty.kind() { . ty::Adt(def, _) if def.is_union() || def.is_struct() => { . def.non_enum_variant().fields.iter().position(|f| f.name == name) . }, . ty::Tuple(_) => name.as_str().parse::().ok(), . _ => None, -- line 1570 ---------------------------------------- 38,732 ( 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; . 13,520 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, op: BinOpKind, lhs: &Expr<'_>, rhs: &Expr<'_>, span: Span) { 5,070 ( 0.00%) if let BinOpKind::Div | BinOpKind::Rem = op 288 ( 0.00%) && let lhs_ty = cx.typeck_results().expr_ty(lhs) 1,920 ( 0.00%) => ???:::expr_ty (48x) 192 ( 0.00%) && let rhs_ty = cx.typeck_results().expr_ty(rhs) 1,932 ( 0.00%) => ???:::expr_ty (48x) . && 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, 96 ( 0.00%) span.source_callsite(), 1,152 ( 0.00%) => ???:::source_callsite (48x) 240 ( 0.00%) format!("use of `{}` has been disallowed in this context", op.as_str()), . ); . } 13,520 ( 0.00%) } 96 ( 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<'_>) { 409 ( 0.00%) if self.avoid_breaking_exported_api && cx.effective_visibilities.is_exported(item.owner_id.def_id) { 1,386 ( 0.00%) => ???:::is_exported (28x) . return; . } . . if (def.variants.len() as u64) < self.enum_threshold { . return; . } . 33 ( 0.00%) let Some(ident) = item.kind.ident() else { . return; . }; . let item_name = ident.name.as_str(); 44 ( 0.00%) for var in def.variants { . check_enum_start(cx, item_name, var); . check_enum_end(cx, item_name, var); . } . 11 ( 0.00%) Self::check_enum_common_affix(cx, item, def); . } . . /// Lint the names of struct fields against the name of the struct. 1,512 ( 0.00%) fn check_fields(&self, cx: &LateContext<'_>, item: &Item<'_>, fields: &[FieldDef<'_>]) { 336 ( 0.00%) if (fields.len() as u64) < self.struct_threshold { . return; . } . 272 ( 0.00%) self.check_struct_name_repetition(cx, item, fields); . self.check_struct_common_affix(cx, item, fields); 1,344 ( 0.00%) } . . fn check_enum_common_affix(cx: &LateContext<'_>, item: &Item<'_>, def: &EnumDef<'_>) { . let first = match def.variants.first() { 11 ( 0.00%) Some(variant) => variant.ident.name.as_str(), . None => return, . }; 33 ( 0.00%) let mut pre = camel_case_split(first); 11,621 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::camel_case_split (11x) 22 ( 0.00%) let mut post = pre.clone(); 1,028 ( 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 (11x) 2 ( 0.00%) post.reverse(); . for var in def.variants { . let name = var.ident.name.as_str(); . 51 ( 0.00%) let variant_split = camel_case_split(name); 21,653 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::camel_case_split (17x) 34 ( 0.00%) if variant_split.len() == 1 { . return; . } . 24 ( 0.00%) pre = pre . .iter() . .zip(variant_split.iter()) . .take_while(|(a, b)| a == b) . .map(|e| *e.0) . .collect(); 24 ( 0.00%) post = post . .iter() . .zip(variant_split.iter().rev()) . .take_while(|(a, b)| a == b) . .map(|e| *e.0) . .collect(); . } . let (what, value) = match (have_no_extra_prefix(&pre), post.is_empty()) { . (true, true) => return, -- line 274 ---------------------------------------- -- line 296 ---------------------------------------- . // this prevents linting in macros in which the location of the field identifier names differ . if !fields . .iter() . .all(|field| item.kind.ident().is_some_and(|i| i.span.eq_ctxt(field.ident.span))) . { . return; . } . 408 ( 0.00%) if self.avoid_breaking_exported_api . && fields . .iter() 358 ( 0.00%) .any(|field| cx.effective_visibilities.is_exported(field.def_id)) 15,501 ( 0.00%) => ???:::is_exported (358x) . { . return; . } . . let mut pre: Vec<&str> = match fields.first() { . Some(first_field) => first_field.ident.name.as_str().split('_').collect(), . None => return, . }; . let mut post = pre.clone(); . post.reverse(); . for field in fields { . let field_split: Vec<&str> = field.ident.name.as_str().split('_').collect(); 172 ( 0.00%) if field_split.len() == 1 { . return; . } . 3 ( 0.00%) pre = pre . .into_iter() . .zip(field_split.iter()) . .take_while(|(a, b)| &a == b) . .map(|e| e.0) . .collect(); . post = post . .into_iter() . .zip(field_split.iter().rev()) -- line 332 ---------------------------------------- -- line 335 ---------------------------------------- . .collect(); . } . let prefix = pre.join("_"); . post.reverse(); . let postfix = match post.last() { . Some(&"") => post.join("_") + "_", . Some(_) | None => post.join("_"), . }; 6 ( 0.00%) if fields.len() > 1 { 3 ( 0.00%) let (what, value) = match ( 3 ( 0.00%) prefix.is_empty() || prefix.chars().all(|c| c == '_'), . postfix.is_empty(), . ) { . (true, true) => return, . (false, _) => ("pre", prefix), . (true, false) => ("post", postfix), . }; . if fields.iter().all(|field| is_bool(field.ty)) { . // If all fields are booleans, we don't want to emit this lint. -- line 353 ---------------------------------------- -- 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<'_>]) { 272 ( 0.00%) let Some(ident) = item.kind.ident() else { return }; 136 ( 0.00%) let snake_name = to_snake_case(ident.name.as_str()); 50,461 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::to_snake_case (68x) . let item_name_words: Vec<&str> = snake_name.split('_').collect(); . for field in fields { 2,520 ( 0.00%) if self.avoid_breaking_exported_api && cx.effective_visibilities.is_exported(field.def_id) { 15,615 ( 0.00%) => ???:::is_exported (360x) . continue; . } . 357 ( 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(); 714 ( 0.00%) if field_words.len() >= item_name_words.len() { . // if the field name is shorter than the struct name it cannot contain it 219 ( 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", . ); . } 438 ( 0.00%) if field_words.len() > item_name_words.len() . // lint only if the end is not covered by the start . && field_words . .iter() . .rev() . .zip(item_name_words.iter().rev()) . .all(|(a, b)| a == b) . { . span_lint_hir( -- line 401 ---------------------------------------- -- line 410 ---------------------------------------- . } . } . } . . fn check_enum_start(cx: &LateContext<'_>, item_name: &str, variant: &Variant<'_>) { . let name = variant.ident.name.as_str(); . let item_name_chars = item_name.chars().count(); . 490 ( 0.00%) if count_match_start(item_name, name).char_count == item_name_chars 9,215 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::count_match_start (70x) . && name.chars().nth(item_name_chars).is_some_and(|c| !c.is_lowercase()) . && name.chars().nth(item_name_chars + 1).is_some_and(|c| !c.is_numeric()) . && !check_enum_tuple_path_match(name, variant.data) . { . span_lint_hir( . cx, . ENUM_VARIANT_NAMES, . variant.hir_id, -- line 426 ---------------------------------------- -- line 429 ---------------------------------------- . ); . } . } . . fn check_enum_end(cx: &LateContext<'_>, item_name: &str, variant: &Variant<'_>) { . let name = variant.ident.name.as_str(); . let item_name_chars = item_name.chars().count(); . 560 ( 0.00%) if count_match_end(item_name, name).char_count == item_name_chars 10,190 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::count_match_end (70x) . && !check_enum_tuple_path_match(name, variant.data) . { . span_lint_hir( . cx, . ENUM_VARIANT_NAMES, . variant.hir_id, . variant.span, . "variant name ends with the enum's name", -- line 445 ---------------------------------------- -- line 465 ---------------------------------------- . .any(|segment| segment.ident.name.as_str() == variant_name), . TyKind::Path(QPath::TypeRelative(_, segment)) => segment.ident.name.as_str() == variant_name, . _ => false, . } . } . . impl LateLintPass<'_> for ItemNameRepetitions { . fn check_item_post(&mut self, _: &LateContext<'_>, item: &Item<'_>) { 5,144 ( 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<'_>) { 5,908 ( 0.00%) if let [.., last] = &mut *self.modules { 5,908 ( 0.00%) last.in_body_count += 1; . } . } . . fn check_body_post(&mut self, _: &LateContext<'_>, _: &Body<'_>) { 5,908 ( 0.00%) if let [.., last] = &mut *self.modules { 5,908 ( 0.00%) last.in_body_count -= 1; . } . } . 23,148 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) { 15,452 ( 0.00%) let ident = match item.kind { 148 ( 0.00%) ItemKind::Mod(ident, _) => { 222 ( 0.00%) if let [.., prev] = &*self.modules . && prev.name == ident.name 2 ( 0.00%) && prev.in_body_count == 0 2 ( 0.00%) && (!self.allow_private_module_inception || prev.is_public) 2 ( 0.00%) && !item.span.from_expansion() 6 ( 0.00%) && !is_from_proc_macro(cx, item) 514 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::is_from_proc_macro:: (1x) . { . span_lint( . cx, . MODULE_INCEPTION, 1 ( 0.00%) item.span, . "module has the same name as its containing module", . ); . } . ident . }, . 196 ( 0.00%) ItemKind::Enum(ident, _, def) => { 140 ( 0.00%) if !ident.span.in_external_macro(cx.tcx.sess.source_map()) { 28 ( 0.00%) self.check_variants(cx, item, &def); . } . ident . }, 464 ( 0.00%) ItemKind::Struct(ident, _, data) => { 864 ( 0.00%) if let VariantData::Struct { fields, .. } = data 672 ( 0.00%) && !ident.span.in_external_macro(cx.tcx.sess.source_map()) . { 1,176 ( 0.00%) self.check_fields(cx, item, fields); 323,610 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/item_name_repetitions.rs:::check_fields (168x) . } . ident . }, . . ItemKind::Const(ident, ..) 3 ( 0.00%) | ItemKind::ExternCrate(_, ident) . | ItemKind::Fn { ident, .. } . | ItemKind::Macro(ident, ..) . | ItemKind::Static(_, ident, ..) . | ItemKind::Trait { ident, .. } . | ItemKind::TraitAlias(_, ident, ..) . | ItemKind::TyAlias(ident, ..) . | ItemKind::Union(ident, ..) . | ItemKind::Use(_, UseKind::Single(ident)) => ident, . . ItemKind::ForeignMod { .. } | ItemKind::GlobalAsm { .. } | ItemKind::Impl(_) | ItemKind::Use(..) => return, . }; . . let item_name = ident.name.as_str(); 2,430 ( 0.00%) let item_camel = to_camel_case(item_name); 326,068 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/str_utils.rs:clippy_utils::str_utils::to_camel_case (1,215x) . 2,430 ( 0.00%) if let [.., prev] = &*self.modules 3,615 ( 0.00%) && prev.is_public 1,150 ( 0.00%) && prev.in_body_count == 0 1,128 ( 0.00%) && !item.span.from_expansion() 1,100 ( 0.00%) && !matches!(item.kind, ItemKind::Macro(..)) 2,188 ( 0.00%) && cx.tcx.visibility(item.owner_id).is_public() . { 258 ( 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", . ); . } 258 ( 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() 35 ( 0.00%) && (c == '_' || c.is_uppercase() || c.is_numeric()) . { 15 ( 0.00%) if !is_from_proc_macro(cx, item) { 2,580 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::is_from_proc_macro:: (5x) . span_lint( . cx, . MODULE_NAME_REPETITIONS, . ident.span, . "item name starts with its containing module's name", . ); . } . } else if let Some(s) = item_camel.strip_suffix(&prev.name_camel) 12 ( 0.00%) && !self.is_allowed_prefix(s) 18 ( 0.00%) && !is_from_proc_macro(cx, item) 3,105 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/check_proc_macro.rs:clippy_utils::check_proc_macro::is_from_proc_macro:: (6x) . { . span_lint( . cx, . MODULE_NAME_REPETITIONS, . ident.span, . "item name ends with its containing module's name", . ); . } . } . } . 2,424 ( 0.00%) if matches!(item.kind, ItemKind::Mod(..)) { . self.modules.push(ModInfo { . name: ident.name, . name_camel: item_camel, 222 ( 0.00%) is_public: cx.tcx.visibility(item.owner_id).is_public(), . in_body_count: 0, . }); . } 20,576 ( 0.00%) } . } 14,609 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 23,148 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 12,860 ( 0.00%) let attrs = cx.tcx.hir_attrs(item.hir_id()); 156,436 ( 0.00%) => ???:::hir_attrs (2,572x) 5,528 ( 0.00%) if let ItemKind::Fn { ident, body, .. } = item.kind { 896 ( 0.00%) inline_always::check(cx, item.span, ident.name, attrs, Some(body)); 72,983 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/inline_always.rs:clippy_lints::attrs::inline_always::check (128x) . } 2,444 ( 0.00%) repr_attributes::check(cx, item.span, attrs, self.msrv); 18,004 ( 0.00%) } . . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx ImplItem<'_>) { 12,212 ( 0.00%) if let ImplItemKind::Fn(_, body) = item.kind { 16,814 ( 0.00%) inline_always::check( 382,338 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/inline_always.rs:clippy_lints::attrs::inline_always::check (2,402x) . cx, 2,402 ( 0.00%) item.span, 2,402 ( 0.00%) item.ident.name, 9,608 ( 0.00%) cx.tcx.hir_attrs(item.hir_id()), 155,850 ( 0.00%) => ???:::hir_attrs (2,402x) . Some(body), . ); . } . } . . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) { 140 ( 0.00%) if let TraitItemKind::Fn(_, kind) = item.kind { 420 ( 0.00%) let body = match kind { . TraitFn::Required(_) => None, . TraitFn::Provided(body) => Some(body), . }; 980 ( 0.00%) inline_always::check(cx, item.span, item.ident.name, cx.tcx.hir_attrs(item.hir_id()), body); 9,671 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/inline_always.rs:clippy_lints::attrs::inline_always::check (70x) 4,298 ( 0.00%) => ???:::hir_attrs (70x) . } . } . } . . pub struct EarlyAttributes { . msrv: MsrvStack, . } . . impl EarlyAttributes { . pub fn new(conf: &'static Conf) -> Self { 69 ( 0.00%) Self { msrv: conf.msrv.into() } . } . } . . impl EarlyLintPass for EarlyAttributes { 167,172 ( 0.00%) fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &Attribute) { 83,586 ( 0.00%) deprecated_cfg_attr::check(cx, attr, &self.msrv); 972,206 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_cfg_attr.rs:clippy_lints::attrs::deprecated_cfg_attr::check (27,862x) 83,586 ( 0.00%) deprecated_cfg_attr::check_clippy(cx, attr); 1,210,992 ( 0.03%) => /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 (27,862x) . non_minimal_cfg::check(cx, attr); 111,448 ( 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); . } . 288,500 ( 0.01%) fn check_attribute(&mut self, cx: &EarlyContext<'_>, attr: &Attribute) { 86,550 ( 0.00%) check_clippy_attr(cx.sess(), attr); 1,251,559 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/attrs.rs:clippy_utils::attrs::check_clippy_attr:: (28,850x) 144,250 ( 0.00%) if let Some(items) = &attr.meta_item_list() 227,675 ( 0.01%) => ???:::meta_item_list (28,850x) 3,960 ( 0.00%) && let Some(name) = attr.name() 2,997 ( 0.00%) => ???:::name (333x) . { 55 ( 0.00%) if matches!(name, sym::allow) && self.msrv.meets(msrvs::LINT_REASONS_STABILIZATION) { 264 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (11x) . allow_attributes::check(cx, attr); . } 55 ( 0.00%) if matches!(name, sym::allow | sym::expect) && self.msrv.meets(msrvs::LINT_REASONS_STABILIZATION) { 264 ( 0.00%) => /rust/deps/smallvec-1.15.1/src/lib.rs:::meets (11x) . allow_attributes_without_reason::check(cx, name, items, attr); . } . if is_lint_level(name) { . blanket_clippy_restriction_lints::check(cx, name, items); . } 666 ( 0.00%) if items.is_empty() || !attr.has_name(sym::deprecated) { . return; . } . for item in items { 8 ( 0.00%) if let MetaItemInner::MetaItem(mi) = &item 8 ( 0.00%) && let MetaItemKind::NameValue(lit) = &mi.kind 20 ( 0.00%) && mi.has_name(sym::since) 32 ( 0.00%) => ???:::has_name (4x) . { 8 ( 0.00%) deprecated_semver::check(cx, item.span(), lit); 532 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/deprecated_semver.rs:clippy_lints::attrs::deprecated_semver::check (2x) . } . } . } . . if attr.has_name(sym::should_panic) { . should_panic_without_expect::check(cx, attr); . } . 1,660 ( 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 `= \"..\"`", . ); . } 230,800 ( 0.01%) } . . fn check_item(&mut self, cx: &EarlyContext<'_>, item: &'_ ast::Item) { 5,412 ( 0.00%) match item.kind { 561 ( 0.00%) ast::ItemKind::ExternCrate(..) | ast::ItemKind::Use(..) => useless_attribute::check(cx, item, &item.attrs), 6,794 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/useless_attribute.rs:clippy_lints::attrs::useless_attribute::check (187x) . _ => {}, . } . 9,020 ( 0.00%) mixed_attributes_style::check(cx, item.span, &item.attrs); 2,116,633 ( 0.06%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/attrs/mixed_attributes_style.rs:clippy_lints::attrs::mixed_attributes_style::check (1,804x) . } . 733,710 ( 0.02%) fn check_attributes(&mut self, cx: &EarlyContext<'_>, attrs: &[Attribute]) { 220,113 ( 0.01%) self.msrv.check_attributes(attrs); 671,458 ( 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 (73,371x) . duplicated_attributes::check(cx, attrs); 146,742 ( 0.00%) msrvs::check_attrs(cx.sess(), attrs); 1,771,216 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:clippy_utils::msrvs::check_attrs:: (73,371x) 586,968 ( 0.02%) } . . fn check_attributes_post(&mut self, _cx: &EarlyContext<'_>, attrs: &[Attribute]) { 293,484 ( 0.01%) self.msrv.check_attributes_post(attrs); 671,458 ( 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 (73,371x) . } . } 551 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/methods/or_fun_call.rs -------------------------------------------------------------------------------- Ir -- line 16 ---------------------------------------- . use rustc_hir as hir; . use rustc_lint::LateContext; . use rustc_middle::ty; . use rustc_span::{Span, Symbol}; . . use super::{OR_FUN_CALL, UNWRAP_OR_DEFAULT}; . . /// Checks for the `OR_FUN_CALL` lint. 18,783 ( 0.00%) pub(super) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &hir::Expr<'_>, . method_span: Span, . name: Symbol, . receiver: &'tcx hir::Expr<'_>, . args: &'tcx [hir::Expr<'_>], . msrv: Msrv, . ) { . // Bail out early unless the method is one that `check_unwrap_or_default` or . // `check_or_fn_call` can lint, to avoid walking the argument of every method call. . if !matches!( . name, 41,690 ( 0.00%) sym::unwrap_or . | sym::unwrap_or_else . | sym::or_insert . | sym::or_insert_with . | sym::get_or_insert . | sym::map_or . | sym::ok_or . | sym::or . | sym::and . ) { . return; . } . 608 ( 0.00%) if let [arg] = args { 130 ( 0.00%) let inner_arg = peel_blocks(arg); 130 ( 0.00%) for_each_expr(cx.tcx, inner_arg, |ex| { . // `or_fun_call` lint needs to take nested expr into account, . // but `unwrap_or_default` lint doesn't, we don't want something like: . // `opt.unwrap_or(Foo { inner: String::default(), other: 1 })` to get replaced by . // `opt.unwrap_or_default()`. 210 ( 0.00%) let is_nested_expr = ex.hir_id != inner_arg.hir_id; . 1,455 ( 0.00%) let is_triggered = match ex.kind { 4 ( 0.00%) hir::ExprKind::Call(fun, fun_args) => { . let inner_fun_has_args = !fun_args.is_empty(); 16 ( 0.00%) let fun_span = if inner_fun_has_args || is_nested_expr { 4 ( 0.00%) None . } else { 12 ( 0.00%) Some(fun.span) . }; . (!inner_fun_has_args . && !is_nested_expr 76 ( 0.00%) && check_unwrap_or_default(cx, name, receiver, fun, Some(ex), expr.span, method_span, msrv)) 1,296,695 ( 0.04%) => site/frontend/rust-clippy/clippy_lints/src/methods/or_fun_call.rs:clippy_lints::methods::or_fun_call::check_unwrap_or_default (4x) 73 ( 0.00%) || check_or_fn_call(cx, name, method_span, receiver, arg, None, expr.span, fun_span) . }, 156 ( 0.00%) hir::ExprKind::Path(..) | hir::ExprKind::Closure(..) if !is_nested_expr => { 286 ( 0.00%) check_unwrap_or_default(cx, name, receiver, ex, None, expr.span, method_span, msrv) 604 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/methods/or_fun_call.rs:clippy_lints::methods::or_fun_call::check_unwrap_or_default (22x) . }, . hir::ExprKind::Index(..) | hir::ExprKind::MethodCall(..) => { 182 ( 0.00%) check_or_fn_call(cx, name, method_span, receiver, arg, None, expr.span, None) . }, . _ => false, . }; . 106 ( 0.00%) if is_triggered { . ControlFlow::Break(()) . } else { . ControlFlow::Continue(()) . } . }); . } . . // `map_or` takes two arguments 44 ( 0.00%) if let [arg, lambda] = args { 44 ( 0.00%) let inner_arg = peel_blocks(arg); 44 ( 0.00%) for_each_expr(cx.tcx, inner_arg, |ex| { 44 ( 0.00%) let is_top_most_expr = ex.hir_id == inner_arg.hir_id; 218 ( 0.00%) match ex.kind { . hir::ExprKind::Call(fun, fun_args) => { . let fun_span = if fun_args.is_empty() && is_top_most_expr { . Some(fun.span) . } else { . None . }; . if check_or_fn_call(cx, name, method_span, receiver, arg, Some(lambda), expr.span, fun_span) { . return ControlFlow::Break(()); . } . }, . hir::ExprKind::MethodCall(..) 14 ( 0.00%) if check_or_fn_call(cx, name, method_span, receiver, arg, Some(lambda), expr.span, None) => . { . return ControlFlow::Break(()); . }, . _ => {}, . } . ControlFlow::Continue(()) . }); . } 12,522 ( 0.00%) } . . /// Checks for `unwrap_or(T::new())`, `unwrap_or(T::default())`, . /// `or_insert(T::new())` or `or_insert(T::default())`. . /// Similarly checks for `unwrap_or_else(T::new)`, `unwrap_or_else(T::default)`, . /// `or_insert_with(T::new)` or `or_insert_with(T::default)`. . #[expect(clippy::too_many_arguments)] 312 ( 0.00%) fn check_unwrap_or_default( . cx: &LateContext<'_>, . name: Symbol, . receiver: &hir::Expr<'_>, . fun: &hir::Expr<'_>, . call_expr: Option<&hir::Expr<'_>>, . span: Span, . method_span: Span, . msrv: Msrv, . ) -> bool { 20 ( 0.00%) let sugg = match (name, call_expr.is_some()) { 118 ( 0.00%) (sym::unwrap_or, true) | (sym::unwrap_or_else, false) => sym::unwrap_or_default, . (sym::or_insert, true) | (sym::or_insert_with, false) => sym::or_default, . _ => return false, . }; . 16 ( 0.00%) let receiver_ty = cx.typeck_results().expr_ty_adjusted(receiver).peel_refs(); 288 ( 0.00%) => ???:::expr_ty_adjusted (4x) . . // Check MSRV, but only for `Result::unwrap_or_default` 8 ( 0.00%) if receiver_ty.is_diag_item(cx, sym::Result) && !msrv.meets(cx, msrvs::RESULT_UNWRAP_OR_DEFAULT) { . return false; . } . . // `Default` for raw pointers is only stable since 1.88.0, so the suggestion would not compile . // below that MSRV (#17379). Only reachable under `-Zbuild-std`, hence not covered by our UI . // tests against a precompiled `std` — removing this breaks no test, but does bring the false . // positive back for build-std users. 4 ( 0.00%) if let Some(call_expr) = call_expr 16 ( 0.00%) && cx.typeck_results().expr_ty(call_expr).is_raw_ptr() 160 ( 0.00%) => ???:::expr_ty (4x) 4 ( 0.00%) && !msrv.meets(cx, msrvs::RAW_PTR_DEFAULT) . { . return false; . } . 20 ( 0.00%) if !expr_type_is_certain(cx, receiver) { 299,262 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/type_certainty/mod.rs:clippy_utils::ty::type_certainty::expr_type_is_certain (4x) . return false; . } . . let is_new = |fun: &hir::Expr<'_>| { 16 ( 0.00%) if let hir::ExprKind::Path(ref qpath) = fun.kind { 4 ( 0.00%) let path = last_path_segment(qpath).ident.name; 16 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::last_path_segment (4x) 4 ( 0.00%) matches!(path, sym::new) . } else { . false . } . }; . . let output_type_implements_default = |fun| { . let fun_ty = cx.typeck_results().expr_ty(fun); . if let ty::FnDef(def_id, args) = *fun_ty.kind() { -- line 171 ---------------------------------------- -- line 180 ---------------------------------------- . .get_diagnostic_item(sym::Default) . .is_some_and(|default_trait_id| implements_trait(cx, output_ty, default_trait_id, &[])) . } else { . false . } . }; . . let Some(suggested_method_def_id) = receiver_ty.ty_adt_def().and_then(|adt_def| { 4 ( 0.00%) cx.tcx . .inherent_impls(adt_def.did()) . .iter() 20 ( 0.00%) .flat_map(|&impl_id| cx.tcx.associated_items(impl_id).filter_by_name_unhygienic(sugg)) 514 ( 0.00%) => ???:::filter_by_name_unhygienic (5x) . .find_map(|assoc| { 24 ( 0.00%) if assoc.is_method() && cx.tcx.fn_sig(assoc.def_id).skip_binder().inputs().skip_binder().len() == 1 { . Some(assoc.def_id) . } else { . None . } . }) . }) else { . return false; . }; . let in_sugg_method_implementation = { 4 ( 0.00%) matches!( . suggested_method_def_id.as_local(), . Some(local_def_id) if local_def_id == cx.tcx.hir_get_parent_item(receiver.hir_id).def_id . ) . }; . if in_sugg_method_implementation { . return false; . } . . // `.unwrap_or(vec![])` is as readable as `.unwrap_or_default()`. And if the expression is a . // non-empty `Vec`, then it will not be a default value anyway. Bail out in all cases. 20 ( 0.00%) if call_expr.and_then(|call_expr| VecArgs::hir(cx, call_expr)).is_some() { 264 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (4x) . return false; . } . . // needs to target Default::default in particular or be *::new and have a Default impl . // available 4 ( 0.00%) if (is_new(fun) && output_type_implements_default(fun)) 12 ( 0.00%) || match call_expr { 16 ( 0.00%) Some(call_expr) => is_default_equivalent(cx, call_expr), 554,905 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_default_equivalent (4x) . None => is_default_equivalent_call(cx, fun, None) || closure_body_returns_empty_to_string(cx, fun), . } . { 15 ( 0.00%) span_lint_and_sugg( 279,429 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_sugg:: (1x) . cx, . UNWRAP_OR_DEFAULT, . method_span.with_hi(span.hi()), 3 ( 0.00%) format!("use of `{name}` to construct default value"), . "try", 2 ( 0.00%) format!("{sugg}()"), . Applicability::MachineApplicable, . ); . . true . } else { . false . } 208 ( 0.00%) } . . /// Checks for `*or(foo())`. . #[expect(clippy::too_many_arguments)] 483 ( 0.00%) fn check_or_fn_call<'tcx>( . cx: &LateContext<'tcx>, . name: Symbol, . method_span: Span, . self_expr: &hir::Expr<'_>, . arg: &'tcx hir::Expr<'_>, . // `Some` if fn has second argument . second_arg: Option<&hir::Expr<'_>>, . span: Span, -- line 252 ---------------------------------------- -- line 265 ---------------------------------------- . ), . (sym::Option, false, &[sym::get_or_insert], "with"), . (sym::Option, true, &[sym::and], "then"), . (sym::Result, true, &[sym::map_or, sym::or, sym::unwrap_or], "else"), . (sym::Result, true, &[sym::and], "then"), . ]; . . if KNOW_TYPES.iter().any(|k| k.2.contains(&name)) 181 ( 0.00%) && switch_to_lazy_eval(cx, arg) 56,108 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/eager_or_lazy.rs:clippy_utils::eager_or_lazy::switch_to_lazy_eval (21x) 34 ( 0.00%) && !contains_return(arg) 34 ( 0.00%) && let self_ty = cx.typeck_results().expr_ty(self_expr) 680 ( 0.00%) => ???:::expr_ty (17x) 119 ( 0.00%) && let Some(&(_, fn_has_arguments, _, suffix)) = KNOW_TYPES . .iter() 67 ( 0.00%) .find(|&&i| self_ty.is_diag_item(cx, i.0) && i.2.contains(&name)) . { . let ctxt = span.ctxt(); 17 ( 0.00%) let mut app = Applicability::HasPlaceholders; . let sugg = { 68 ( 0.00%) let (snippet_span, use_lambda) = match (fn_has_arguments, fun_span) { 3 ( 0.00%) (false, Some(fun_span)) => (fun_span, false), 14 ( 0.00%) _ => (arg.span, true), . }; . 68 ( 0.00%) let snip = snippet_with_context(cx, snippet_span, ctxt, "..", &mut app).0; . let snip = if use_lambda { 84 ( 0.00%) let l_arg = if fn_has_arguments { "_" } else { "" }; 112 ( 0.00%) format!("|{l_arg}| {snip}") . } else { 6 ( 0.00%) snip.into_owned() . }; . 34 ( 0.00%) if let Some(f) = second_arg { 5 ( 0.00%) let f = snippet_with_context(cx, f.span, ctxt, "..", &mut app).0; 7 ( 0.00%) format!("{snip}, {f}") . } else { 64 ( 0.00%) snip . } 34 ( 0.00%) }; . let span_replace_word = method_span.with_hi(span.hi()); 187 ( 0.00%) span_lint_and_sugg( 36,883 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_sugg:: (17x) . cx, . OR_FUN_CALL, . span_replace_word, 51 ( 0.00%) format!("function call inside of `{name}`"), . "try", 170 ( 0.00%) format!("{name}_{suffix}({sugg})"), . app, . ); . true . } else { . false . } 168 ( 0.00%) } . . fn closure_body_returns_empty_to_string(cx: &LateContext<'_>, e: &hir::Expr<'_>) -> bool { . if let hir::ExprKind::Closure(&hir::Closure { body, .. }) = e.kind { . let body = cx.tcx.hir_body(body); . . if body.params.is_empty() . && let hir::Expr { kind, .. } = &body.value . && let hir::ExprKind::MethodCall(hir::PathSegment { ident, .. }, self_arg, [], _) = kind -- line 325 ---------------------------------------- 13,493 ( 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 { 981 ( 0.00%) if let hir::TyKind::Path(ref qpath) = ty.kind { 327 ( 0.00%) is_ty_alias(qpath) 5,232 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_ty_alias (327x) . } else { . false . } . } . . impl LateLintPass<'_> for DefaultConstructedUnitStructs { 435,022 ( 0.01%) fn check_expr<'tcx>(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { 137,273 ( 0.00%) if let ExprKind::Call(fn_expr, &[]) = expr.kind . // make sure we have a call to `Default::default` 2,547 ( 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 2,616 ( 0.00%) && !is_alias(*base) 3,240 ( 0.00%) && let Res::Def(_, def_id) = cx.qpath_res(qpath, fn_expr.hir_id) 25,320 ( 0.00%) => ???:::qpath_res (324x) 1,620 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::default_fn, def_id) 22,346 ( 0.00%) => ???:::is_diagnostic_item (324x) . // make sure we have a struct with no fields (unit struct) 104 ( 0.00%) && let ty::Adt(def, ..) = cx.typeck_results().expr_ty(expr).kind() 1,040 ( 0.00%) => ???:::expr_ty (26x) 52 ( 0.00%) && def.is_struct() 78 ( 0.00%) && let var @ ty::VariantDef { ctor: Some((hir::def::CtorKind::Const, _)), .. } = def.non_enum_variant() 208 ( 0.00%) => ???:::non_enum_variant (26x) . && !var.is_field_list_non_exhaustive() . && !expr.span.from_expansion() && !qpath.span().from_expansion() . // do not suggest replacing an expression by a type name with placeholders . && !base.is_suggestable_infer_ty() . { . let mut removals = vec![(expr.span.with_lo(qpath.qself_span().hi()), String::new())]; . if expr.span.check_text(cx, |s| s.starts_with('<')) { . // Remove `<`, '>` has already been removed by the existing removal expression. -- line 82 ---------------------------------------- -- line 91 ---------------------------------------- . diag.multipart_suggestion( . "remove this call to `default`", . removals, . Applicability::MachineApplicable, . ); . }, . ); . } 497,168 ( 0.01%) } . } 1,305 ( 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 124,292 ( 0.00%) if let hir::ExprKind::Lit(lit) = expr.kind 5,818 ( 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, . ); . }, . ); . } . } 497,168 ( 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 ---------------------------------------- 2,909 ( 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)] 559,314 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . let from_expansion = expr.span.from_expansion(); . 196,042 ( 0.01%) if let ExprKind::Match(ex, arms, source) = expr.kind { 10,262 ( 0.00%) if is_direct_expn_of(expr.span, sym::matches).is_some() 75,646 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_direct_expn_of (1,372x) . && let [arm, _] = arms . { 72 ( 0.00%) redundant_pattern_match::check_match(cx, expr, ex, arms); 527 ( 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 (9x) 9 ( 0.00%) redundant_pattern_match::check_matches_true(cx, expr, arm, ex); . } 8,232 ( 0.00%) if expr.span.in_external_macro(cx.tcx.sess.source_map()) { . return; . } . 1,856 ( 0.00%) if source == MatchSource::Normal && !is_span_match(cx, expr.span) { . return; . } 12,760 ( 0.00%) if matches!(source, MatchSource::Normal | MatchSource::ForLoopDesugar) { 4,494 ( 0.00%) significant_drop_in_scrutinee::check_match(cx, expr, ex, arms, source); 658,103 ( 0.02%) => /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 (642x) . } . 7,656 ( 0.00%) collapsible_match::check_match(cx, ex, arms, self.msrv); 183,247 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/collapsible_match.rs:clippy_lints::matches::collapsible_match::check_match (1,276x) 2,552 ( 0.00%) if !from_expansion { . // These don't depend on a relationship between multiple arms 4,610 ( 0.00%) match_wild_err_arm::check(cx, ex, arms); 587,901 ( 0.02%) => /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 (922x) 4,610 ( 0.00%) wild_in_or_pats::check(cx, ex, arms); 1,648,248 ( 0.05%) => /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 (922x) . } . 3,828 ( 0.00%) if let MatchSource::TryDesugar(_) = source { 1,900 ( 0.00%) try_err::check(cx, expr, ex); 109,788 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/try_err.rs:clippy_lints::matches::try_err::check (634x) . } . . if !from_expansion 922 ( 0.00%) && let mut has_cfg = false 922 ( 0.00%) && let mut has_comments = false 12,702 ( 0.00%) && walk_intra_arm_text(cx, expr.span, ex.span, arms, |s| { 10,656 ( 0.00%) let mut iter = tokenize_with_text(s).filter(|(t, ..)| match t { . TokenKind::Whitespace => false, . TokenKind::LineComment { .. } | TokenKind::BlockComment { .. } => { 72 ( 0.00%) has_comments = true; . false . }, . _ => true, . }); . while let Some((t, ..)) = iter.next() { . if matches!(t, TokenKind::Pound) . && matches!(iter.next(), Some((TokenKind::OpenBracket, ..))) 3 ( 0.00%) && matches!(iter.next(), Some((TokenKind::Ident, "cfg", _))) . { 6 ( 0.00%) has_cfg = true; . } . } 9,440 ( 0.00%) }) . && !has_cfg . { 288 ( 0.00%) if source == MatchSource::Normal { 2,016 ( 0.00%) let is_match_like_matches = self.msrv.meets(cx, msrvs::MATCHES_MACRO) 7,776 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (288x) 1,440 ( 0.00%) && match_like_matches::check_match(cx, expr, ex, arms); 4,438,370 ( 0.12%) => /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 (288x) . // 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. 576 ( 0.00%) if !(is_match_like_matches 2,009 ( 0.00%) || (is_lint_allowed(cx, MATCH_SAME_ARMS, expr.hir_id) 248,216 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (287x) 877 ( 0.00%) && arms.iter().all(|arm| cx.tcx.hir_attrs(arm.hir_id).is_empty()))) 60,685 ( 0.00%) => ???:::hir_attrs (877x) . { . match_same_arms::check(cx, arms); . } . 2,304 ( 0.00%) redundant_pattern_match::check_match(cx, expr, ex, arms); 9,556 ( 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 (288x) 2,016 ( 0.00%) single_match::check(cx, ex, arms, expr, has_comments); 506,272 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/single_match.rs:clippy_lints::matches::single_match::check (288x) 1,728 ( 0.00%) match_bool::check(cx, ex, arms, expr); 21,624 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/match_bool.rs:clippy_lints::matches::match_bool::check (288x) 1,440 ( 0.00%) overlapping_arms::check(cx, ex, arms); 49,414 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/overlapping_arms.rs:clippy_lints::matches::overlapping_arms::check (288x) 1,440 ( 0.00%) match_wild_enum::check(cx, ex, arms); 112,152 ( 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 (288x) 1,728 ( 0.00%) match_as_ref::check(cx, ex, arms, expr); 36,397 ( 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 (288x) 1,728 ( 0.00%) needless_match::check_match(cx, ex, arms, expr); 117,548 ( 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 (288x) 1,440 ( 0.00%) match_str_case_mismatch::check(cx, ex, arms); 18,756 ( 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 (288x) 1,440 ( 0.00%) redundant_guards::check(cx, arms, self.msrv); 352,919 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/redundant_guards.rs:clippy_lints::matches::redundant_guards::check (288x) . 1,152 ( 0.00%) if !is_in_const_context(cx) { 95,190 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (288x) 1,995 ( 0.00%) manual_unwrap_or::check_match(cx, expr, ex, arms); 420,481 ( 0.01%) => /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 (285x) 1,710 ( 0.00%) manual_map::check_match(cx, expr, ex, arms); 52,409 ( 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 (285x) 1,710 ( 0.00%) manual_filter::check_match(cx, ex, arms, expr); 39,959 ( 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 (285x) 1,995 ( 0.00%) manual_ok_err::check_match(cx, expr, ex, arms); 36,985 ( 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 (285x) . } . 576 ( 0.00%) if self.infallible_destructuring_match_linted { . self.infallible_destructuring_match_linted = false; . } else { 1,728 ( 0.00%) match_single_binding::check(cx, ex, arms, expr); 8,406 ( 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 (288x) . } . } . match_ref_pats::check(cx, ex, arms.iter().map(|el| el.pat), expr); . } 365,280 ( 0.01%) } else if let Some(if_let) = higher::IfLet::hir(cx, expr) { 335,425 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (60,774x) 530 ( 0.00%) if expr.span.in_external_macro(cx.tcx.sess.source_map()) { . return; . } . collapsible_match::check_if_let( . cx, 424 ( 0.00%) if_let.let_span.ctxt(), 106 ( 0.00%) if_let.let_pat, 106 ( 0.00%) if_let.if_then, 106 ( 0.00%) if_let.if_else, 106 ( 0.00%) if_let.let_expr, 106 ( 0.00%) self.msrv, . ); . significant_drop_in_scrutinee::check_if_let(cx, expr, if_let.let_expr, if_let.if_then, if_let.if_else); 320 ( 0.00%) if !from_expansion { 212 ( 0.00%) if let Some(else_expr) = if_let.if_else { 248 ( 0.00%) if self.msrv.meets(cx, msrvs::MATCHES_MACRO) { 837 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/msrvs.rs:::meets (31x) 217 ( 0.00%) match_like_matches::check_if_let( 644,080 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/match_like_matches.rs:clippy_lints::matches::match_like_matches::check_if_let (31x) . cx, . expr, . if_let.let_pat, . if_let.let_expr, . if_let.if_then, . else_expr, . ); . } 186 ( 0.00%) if !is_in_const_context(cx) { 10,121 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_in_const_context (31x) . manual_unwrap_or::check_if_let( . cx, . expr, . if_let.let_pat, . if_let.let_expr, . if_let.if_then, . else_expr, . ); -- line 1183 ---------------------------------------- -- line 1185 ---------------------------------------- . manual_filter::check_if_let( . cx, . expr, . if_let.let_pat, . if_let.let_expr, . if_let.if_then, . else_expr, . ); 310 ( 0.00%) manual_ok_err::check_if_let( 5,418 ( 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_if_let (31x) . cx, . expr, . if_let.let_pat, . if_let.let_expr, . if_let.if_then, . else_expr, . ); . } -- line 1201 ---------------------------------------- -- line 1203 ---------------------------------------- . redundant_pattern_match::check_if_let( . cx, . expr, . if_let.let_pat, . if_let.let_expr, . if_let.if_else.is_some(), . if_let.let_span, . ); 318 ( 0.00%) needless_match::check_if_let(cx, expr, &if_let); 44,775 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/matches/needless_match.rs:clippy_lints::matches::needless_match::check_if_let (106x) . } . } else { 303,340 ( 0.01%) if expr.span.in_external_macro(cx.tcx.sess.source_map()) { . return; . } . if let Some(while_let) = higher::WhileLet::hir(expr) { 63 ( 0.00%) significant_drop_in_scrutinee::check_while_let(cx, expr, while_let.let_expr, while_let.if_then); 19,210 ( 0.00%) => /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_while_let (21x) . } 524 ( 0.00%) if !from_expansion { . redundant_pattern_match::check(cx, expr); . } . } 497,168 ( 0.01%) } . . fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'_>) { 2,066 ( 0.00%) self.infallible_destructuring_match_linted |= 8,264 ( 0.00%) local.els.is_none() && infallible_destructuring_match::check(cx, local); 59,804 ( 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 (2,066x) . } . . fn check_pat(&mut self, cx: &LateContext<'tcx>, pat: &'tcx Pat<'_>) { 38,601 ( 0.00%) rest_pat_in_fully_bound_struct::check(cx, pat); 375,085 ( 0.01%) => /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 (12,867x) . } . } . . /// 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 { 5,532 ( 0.00%) if let Some(src) = match_sp.get_source_range(cx) 1,844 ( 0.00%) && let scrutinee_sp = scrutinee_sp.source_callsite().data() 86,592 ( 0.00%) => ???:::source_callsite (922x) . && 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) 922 ( 0.00%) && let Some(block_text) = src_text.get(block_start..src.range.end) 1,844 ( 0.00%) && let Some(stripped_text) = block_text.trim_start_matches(is_whitespace).strip_prefix('{') 19,022 ( 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:: (922x) . && let arms_start = block_start + (block_text.len() - stripped_text.len()) . && let Some(arms_end) = stripped_text 870 ( 0.00%) .trim_end_matches(|c| is_whitespace(c) || c == ')') 7,540 ( 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}> (290x) . .strip_suffix('}') 580 ( 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| { 890 ( 0.00%) let arm_sp: rustc_span::SpanData = arm.span.source_callsite().data(); 21,360 ( 0.00%) => ???:::source_callsite (890x) 2,670 ( 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; 5,340 ( 0.00%) if range.start <= arm_range.start . && arm_range.end <= range.end . && let Some(src) = src_text.get(range.start..arm_range.start) . { 3,560 ( 0.00%) f(src); 404,240 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/matches/mod.rs:::check_expr::{closure#0} (890x) . Some(arm_range.end..range.end) . } else { . None . } . }) . && let Some(src) = src_text.get(range) . { 290 ( 0.00%) f(src); 102,615 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/matches/mod.rs:::check_expr::{closure#0} (290x) . 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,704 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_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(()) . } . 131,406 ( 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 { 39,096 ( 0.00%) self.cstore_untracked().def_key(id) 1,026,556 ( 0.03%) => ???:::def_key (13,032x) . } 153,307 ( 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> { 22,851 ( 0.00%) self.interners.intern_ty(st) 101 ( 0.00%) => ???:::intern_ty (1x) . } . . pub fn mk_param_from_def(self, param: &ty::GenericParamDef) -> GenericArg<'tcx> { . match param.kind { . GenericParamDefKind::Lifetime => { . ty::Region::new_early_param(self, param.to_early_bound_region_data()).into() . } . GenericParamDefKind::Type { .. } => Ty::new_param(self, param.index, param.name).into(), -- line 2240 ---------------------------------------- -- line 2436 ---------------------------------------- . T::collect_and_apply(iter, |xs| self.mk_type_list(xs)) . } . . pub fn mk_args_from_iter(self, iter: I) -> T::Output . where . I: Iterator, . T: CollectAndApply, ty::GenericArgsRef<'tcx>>, . { 8,691 ( 0.00%) T::collect_and_apply(iter, |xs| self.mk_args(xs)) 49,896 ( 0.00%) => ???:::mk_args (594x) . } . . 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] 791 ( 0.00%) pub fn emit_node_span_lint( . self, . lint: &'static Lint, . hir_id: HirId, . span: impl Into, . decorator: impl for<'a> Diagnostic<'a, ()>, . ) { 10,010 ( 0.00%) let level_spec = self.lint_level_spec_at_node(lint, hir_id); 8,610 ( 0.00%) => ???:::lint_level_spec_at_node (6x) 19,091 ( 0.00%) emit_lint_base(self.sess, lint, level_spec, Some(span.into()), decorator) 2,301,567 ( 0.06%) => /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> (6x) 450 ( 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 { 3,822 ( 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 ---------------------------------------- 83,874 ( 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 { 65,996 ( 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)] 24,356 ( 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) } 24,356 ( 0.00%) } . } . . impl RawVec { . #[cfg(not(no_global_oom_handling))] . pub(crate) const MIN_NON_ZERO_CAP: usize = min_non_zero_cap(size_of::()); . . /// Like `new`, but parameterized over the choice of allocator for . /// the returned `RawVec`. -- line 197 ---------------------------------------- -- line 376 ---------------------------------------- . . /// The same as `reserve_exact`, but returns on errors instead of panicking or aborting. . pub(crate) fn try_reserve_exact( . &mut self, . len: usize, . additional: usize, . ) -> Result<(), TryReserveError> { . // SAFETY: All calls on self.inner pass T::LAYOUT as the elem_layout 1,565 ( 0.00%) unsafe { self.inner.try_reserve_exact(len, additional, T::LAYOUT) } 16,386 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:::try_reserve_exact (145x) . } . . /// Shrinks the buffer down to the specified capacity. If the given amount . /// is 0, actually completely deallocates. . /// . /// # Panics . /// . /// Panics if the given amount is *larger* than the current capacity. -- line 392 ---------------------------------------- -- line 417 ---------------------------------------- . } . } . . #[rustc_const_unstable(feature = "const_heap", issue = "79597")] . const unsafe impl<#[may_dangle] T, A: [const] Allocator + [const] Destruct> Drop for RawVec { . /// Frees the memory owned by the `RawVec` *without* trying to drop its contents. . fn drop(&mut self) { . // SAFETY: We are in a Drop impl, self.inner will not be used again. 510,027 ( 0.01%) unsafe { self.inner.deallocate(T::LAYOUT) } . } . } . . #[rustc_const_unstable(feature = "const_heap", issue = "79597")] . #[rustfmt::skip] // FIXME(fee1-dead): temporary measure before rustfmt is bumped . const impl RawVecInner { . #[cfg(not(no_global_oom_handling))] . #[inline] . fn with_capacity_in(capacity: usize, alloc: A, elem_layout: Layout) -> Self { 28 ( 0.00%) match Self::try_allocate_in(capacity, AllocInit::Uninitialized, alloc, elem_layout) { 308 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:::try_allocate_in (4x) 4 ( 0.00%) Ok(this) => { . unsafe { . // Make it more obvious that a subsequent Vec::reserve(capacity) will not allocate. . hint::assert_unchecked(!this.needs_to_grow(0, capacity, elem_layout)); . } . this . } . Err(err) => handle_error(err), . } . } . 36 ( 0.00%) fn try_allocate_in( . capacity: usize, . init: AllocInit, . alloc: A, . elem_layout: Layout, . ) -> Result { . // We avoid `unwrap_or_else` here because it bloats the amount of . // LLVM IR generated. . let layout = match layout_array(capacity, elem_layout) { . Ok(layout) => layout, . Err(_) => return Err(CapacityOverflow.into()), . }; . . // Don't allocate here because `Drop` will not deallocate when `capacity` is 0. 116,056 ( 0.00%) if layout.size() == 0 { . return Ok(Self::new_in(alloc, elem_layout.alignment())); . } . 8 ( 0.00%) let result = match init { . AllocInit::Uninitialized => alloc.allocate(layout), . #[cfg(not(no_global_oom_handling))] . AllocInit::Zeroed => alloc.allocate_zeroed(layout), . }; 107,243 ( 0.00%) let ptr = match result { . Ok(ptr) => ptr, . Err(_) => return Err(AllocError { layout, non_exhaustive: () }.into()), . }; . . // Allocators currently return a `NonNull<[u8]>` whose length . // matches the size requested. If that ever changes, the capacity . // here should change to `ptr.len() / size_of::()`. 12 ( 0.00%) Ok(Self { . ptr: Unique::from(ptr.cast()), . cap: unsafe { Cap::new_unchecked(capacity) }, . alloc, . }) 28 ( 0.00%) } . . /// # Safety . /// - `elem_layout` must be valid for `self`, i.e. it must be the same `elem_layout` used to . /// initially construct `self` . /// - `elem_layout`'s size must be a multiple of its alignment . #[cfg(not(no_global_oom_handling))] . #[inline] . unsafe fn grow_one(&mut self, elem_layout: Layout) { . // SAFETY: Precondition passed to caller 6,089 ( 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); . 18,856 ( 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`. 24,947 ( 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 64,822 ( 0.00%) let ptr = unsafe { self.finish_grow(cap, elem_layout)? }; 6,795 ( 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 (37x) . . // 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] 175,076 ( 0.00%) unsafe fn finish_grow( . &self, . cap: usize, . elem_layout: Layout, . ) -> Result, TryReserveError> { . let new_layout = layout_array(cap, elem_layout)?; . . let memory = if let Some((ptr, old_layout)) = unsafe { self.current_memory(elem_layout) } { . // FIXME(const-hack): switch to `debug_assert_eq` -- line 552 ---------------------------------------- -- line 556 ---------------------------------------- . hint::assert_unchecked(old_layout.align() == new_layout.align()); . self.alloc.grow(ptr, old_layout, new_layout) . } . } else { . self.alloc.allocate(new_layout) . }; . . memory.map_err(const |_| AllocError { layout: new_layout, non_exhaustive: () }.into()) 131,308 ( 0.00%) } . } . . impl RawVecInner { . #[inline] . const fn new_in(alloc: A, align: Alignment) -> Self { . let ptr = Unique::from_non_null(NonNull::without_provenance(align.as_nonzero_usize())); . // `cap: 0` means "unallocated". zero-sized types are ignored. . Self { ptr, cap: ZERO_CAP, alloc } -- line 572 ---------------------------------------- -- line 603 ---------------------------------------- . . #[inline] . const fn ptr(&self) -> *mut T { . self.non_null::().as_ptr() . } . . #[inline] . const fn non_null(&self) -> NonNull { 676,881 ( 0.02%) self.ptr.cast().as_non_null_ptr() . } . . #[inline] . const fn capacity(&self, elem_size: usize) -> usize { 16,553 ( 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)> { 533,720 ( 0.01%) if elem_layout.size() == 0 || self.cap.as_inner() == 0 { . None . } else { . // We could use Layout::array here which ensures the absence of isize and usize overflows . // and could hypothetically handle differences between stride and size, but this memory . // has already been allocated so we know it can't overflow and currently Rust does not . // support such types. So we can do better by skipping some checks and avoid an unwrap. . unsafe { . let alloc_size = elem_layout.size().unchecked_mul(self.cap.as_inner()); -- line 639 ---------------------------------------- -- line 650 ---------------------------------------- . #[cfg(not(no_global_oom_handling))] . #[inline] . unsafe fn reserve(&mut self, len: usize, additional: usize, elem_layout: Layout) { . // Callers expect this function to be very cheap when there is already sufficient capacity. . // Therefore, we move all the resizing and error-handling logic from grow_amortized and . // handle_reserve behind a call, while making sure that this function is likely to be . // inlined as just a comparison and a call if the comparison fails. . #[cold] 37,715 ( 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); . } 37,716 ( 0.00%) } . 16,556 ( 0.00%) if self.needs_to_grow(len, additional, elem_layout) { . unsafe { 67,401 ( 0.00%) do_reserve_and_handle(self, len, additional, elem_layout); 647,166 ( 0.02%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/raw_vec/mod.rs:>::reserve::do_reserve_and_handle:: (5,752x) . } . } . } . . /// # Safety . /// - `elem_layout` must be valid for `self`, i.e. it must be the same `elem_layout` used to . /// initially construct `self` . /// - `elem_layout`'s size must be a multiple of its alignment -- line 680 ---------------------------------------- -- line 708 ---------------------------------------- . handle_error(err); . } . } . . /// # Safety . /// - `elem_layout` must be valid for `self`, i.e. it must be the same `elem_layout` used to . /// initially construct `self` . /// - `elem_layout`'s size must be a multiple of its alignment 513 ( 0.00%) unsafe fn try_reserve_exact( . &mut self, . len: usize, . additional: usize, . elem_layout: Layout, . ) -> Result<(), TryReserveError> { 171 ( 0.00%) if self.needs_to_grow(len, additional, elem_layout) { . // SAFETY: Precondition passed to caller . unsafe { . self.grow_exact(len, additional, elem_layout)?; . } . } . unsafe { . // Inform the optimizer that the reservation has succeeded or wasn't needed . hint::assert_unchecked(!self.needs_to_grow(len, additional, elem_layout)); . } . Ok(()) 171 ( 0.00%) } . . /// # Safety . /// - `elem_layout` must be valid for `self`, i.e. it must be the same `elem_layout` used to . /// initially construct `self` . /// - `elem_layout`'s size must be a multiple of its alignment . /// - `cap` must be less than or equal to `self.capacity(elem_layout.size())` . #[cfg(not(no_global_oom_handling))] . #[inline] -- line 741 ---------------------------------------- -- line 756 ---------------------------------------- . cap: usize, . elem_layout: Layout, . ) -> Result<(), TryReserveError> { . unsafe { self.shrink(cap, elem_layout) } . } . . #[inline] . const fn needs_to_grow(&self, len: usize, additional: usize, elem_layout: Layout) -> bool { 18,085 ( 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::()`. 15,691 ( 0.00%) self.ptr = Unique::from(ptr.cast()); 15,689 ( 0.00%) self.cap = unsafe { Cap::new_unchecked(cap) }; . } . . /// # Safety . /// - `elem_layout` must be valid for `self`, i.e. it must be the same `elem_layout` used to . /// initially construct `self` . /// - `elem_layout`'s size must be a multiple of its alignment . /// - The sum of `len` and `additional` must be greater than the current capacity . unsafe fn grow_exact( . &mut self, . len: usize, . additional: usize, . elem_layout: Layout, . ) -> Result<(), TryReserveError> { 171 ( 0.00%) if elem_layout.size() == 0 { . // Since we return a capacity of `usize::MAX` when the type size is . // 0, getting to here necessarily means the `RawVec` is overfull. . return Err(CapacityOverflow.into()); . } . . let cap = len.checked_add(additional).ok_or(CapacityOverflow)?; . . // SAFETY: preconditions passed to caller 38,049 ( 0.00%) let ptr = unsafe { self.finish_grow(cap, elem_layout)? }; 456 ( 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 (6x) . . // 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 3,346 ( 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. 6,692 ( 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 ---------------------------------------- 1,671,649 ( 0.05%) -------------------------------------------------------------------------------- -- 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; . 15,210 ( 0.00%) pub(crate) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . op: BinOpKind, . lhs: &'tcx Expr<'_>, . rhs: &'tcx Expr<'_>, . ) { 8,135 ( 0.00%) let (lhs, rhs) = match op { . BinOpKind::Lt => (lhs, rhs), . BinOpKind::Gt => (rhs, lhs), . _ => return, . }; . 527 ( 0.00%) if let ExprKind::Binary( . // left hand side is a subtraction . Spanned { . node: BinOpKind::Sub, . .. . }, . val_l, . val_r, . ) = lhs.kind -- line 34 ---------------------------------------- -- line 58 ---------------------------------------- . FLOAT_EQUALITY_WITHOUT_ABS, . expr.span, . "float equality check without `.abs()`", . |diag| { . diag.span_suggestion(lhs.span, "add `.abs()`", suggestion, Applicability::MaybeIncorrect); . }, . ); . } 13,520 ( 0.00%) } 315 ( 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. 210,217 ( 0.01%) #[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. 188,853 ( 0.01%) #[derive(Clone, Copy, PartialEq, Eq, Hash)] . pub struct ExpnId { . pub krate: CrateNum, . pub local_id: ExpnIndex, . } . . impl fmt::Debug for ExpnId { . fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { . // Generate crate_::{{expn_}}. -- line 114 ---------------------------------------- -- line 286 ---------------------------------------- . #[inline] . #[track_caller] . pub fn expect_local(self) -> LocalExpnId { . self.as_local().unwrap() . } . . #[inline] . pub fn expn_data(self) -> ExpnData { 79,574 ( 0.00%) HygieneData::with(|data| data.expn_data(self).clone()) 1,193,610 ( 0.03%) => ???:::expn_data (79,574x) . } . . #[inline] . pub fn is_descendant_of(self, ancestor: ExpnId) -> bool { . // a few "fast path" cases to avoid locking HygieneData 16,349 ( 0.00%) if ancestor == ExpnId::root() || ancestor == self { . return true; . } . if ancestor.krate != self.krate { . return false; . } 2,326 ( 0.00%) HygieneData::with(|data| data.is_descendant_of(self, ancestor)) 93,027 ( 0.00%) => ???:::is_descendant_of (2,326x) . } . . /// `expn_id.outer_expn_is_descendant_of(ctxt)` is equivalent to but faster than . /// `expn_id.is_descendant_of(ctxt.outer_expn())`. . #[inline] . pub fn outer_expn_is_descendant_of(self, ctxt: SyntaxContext) -> bool { . // fast path to avoid locking: everything is a descendant of the root context's . // outer expansion -- line 314 ---------------------------------------- -- line 385 ---------------------------------------- . syntax_context_data: vec![root_ctxt_data], . syntax_context_map: iter::once((root_ctxt_data.key(), SyntaxContext(0))).collect(), . expn_data_disambiguators: UnhashMap::default(), . } . } . . #[inline] . fn with(f: impl FnOnce(&mut HygieneData) -> R) -> R { 284,789 ( 0.01%) with_session_globals(|session_globals| f(&mut session_globals.hygiene_data.borrow_mut())) . } . . #[inline] . fn expn_hash(&self, expn_id: ExpnId) -> ExpnHash { . match expn_id.as_local() { . Some(expn_id) => self.local_expn_hashes[expn_id], . None => self.foreign_expn_hashes[&expn_id], . } -- line 401 ---------------------------------------- -- line 441 ---------------------------------------- . #[inline] . fn normalize_to_macro_rules(&self, ctxt: SyntaxContext) -> SyntaxContext { . self.syntax_context_data[ctxt.0 as usize].opaque_and_semiopaque . } . . /// See [`SyntaxContextData::outer_expn`] . #[inline] . fn outer_expn(&self, ctxt: SyntaxContext) -> ExpnId { 226,700 ( 0.01%) self.syntax_context_data[ctxt.0 as usize].outer_expn . } . . /// The last macro expansion and its Transparency . #[inline] . fn outer_mark(&self, ctxt: SyntaxContext) -> (ExpnId, Transparency) { . let data = &self.syntax_context_data[ctxt.0 as usize]; . (data.outer_expn, data.outer_transparency) . } -- line 457 ---------------------------------------- -- line 698 ---------------------------------------- . impl SyntaxContext { . #[inline] . pub const fn root() -> Self { . SyntaxContext(0) . } . . #[inline] . pub const fn is_root(self) -> bool { 366,261 ( 0.01%) self.0 == SyntaxContext::root().as_u32() . } . . #[inline] . pub(crate) const fn as_u32(self) -> u32 { . self.0 . } . . #[inline] -- line 714 ---------------------------------------- -- line 904 ---------------------------------------- . pub fn outer_expn(self) -> ExpnId { . HygieneData::with(|data| data.outer_expn(self)) . } . . /// `ctxt.outer_expn_data()` is equivalent to but faster than . /// `ctxt.outer_expn().expn_data()`. . #[inline] . pub fn outer_expn_data(self) -> ExpnData { 23,811 ( 0.00%) HygieneData::with(|data| data.expn_data(data.outer_expn(self)).clone()) 357,165 ( 0.01%) => ???:::expn_data (23,811x) . } . . /// 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. 1,240,620 ( 0.03%) #[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. 103,385 ( 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. 103,385 ( 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. 107,613 ( 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. 30 ( 0.00%) Macro(MacroKind, Symbol), . /// Transform done by the compiler on the AST. . AstPass(AstPass), . /// Desugaring done by the compiler during AST lowering. . Desugaring(DesugaringKind), . } . . impl ExpnKind { . pub fn descr(&self) -> String { -- line 1144 ---------------------------------------- -- line 1151 ---------------------------------------- . }, . ExpnKind::AstPass(kind) => kind.descr().to_string(), . ExpnKind::Desugaring(kind) => format!("desugaring of {}", kind.descr()), . } . } . } . . /// The kind of macro invocation or definition. 60 ( 0.00%) #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Encodable, Decodable, Hash, Debug)] . #[derive(StableHash)] . pub enum MacroKind { . /// A bang macro `foo!()`. . Bang, . /// An attribute macro `#[foo]`. . Attr, . /// A derive macro `#[derive(Foo)]` . Derive, -- line 1167 ---------------------------------------- -- line 1205 ---------------------------------------- . AstPass::StdImports => "standard library imports", . AstPass::TestHarness => "test harness", . AstPass::ProcMacroHarness => "proc macro harness", . } . } . } . . /// The kind of compiler desugaring. 10,332 ( 0.00%) #[derive(Clone, Copy, PartialEq, Debug, Encodable, Decodable, StableHash)] . pub enum DesugaringKind { . QuestionMark, . TryBlock, . YeetExpr, . /// Desugaring of an `impl Trait` in return type position . /// to an `type Foo = impl Trait;` and replacing the . /// `impl Trait` with `Foo`. . OpaqueTy, -- line 1221 ---------------------------------------- 73,192 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/reserve_after_initialization.rs -------------------------------------------------------------------------------- Ir -- line 29 ---------------------------------------- . #[clippy::version = "1.74.0"] . pub RESERVE_AFTER_INITIALIZATION, . complexity, . "`reserve` called immediately after `Vec` creation" . } . . impl_lint_pass!(ReserveAfterInitialization => [RESERVE_AFTER_INITIALIZATION]); . 1 ( 0.00%) #[derive(Default)] . pub struct ReserveAfterInitialization { . searcher: Option, . } . . struct VecReserveSearcher { . local_id: HirId, . err_span: Span, . init_part: String, . space_hint: String, . } . impl VecReserveSearcher { . fn display_err(&self, cx: &LateContext<'_>) { 17 ( 0.00%) if self.space_hint.is_empty() { . return; . } . . let s = format!("{}Vec::with_capacity({});", self.init_part, self.space_hint); . . span_lint_and_sugg( . cx, . RESERVE_AFTER_INITIALIZATION, -- line 58 ---------------------------------------- -- line 62 ---------------------------------------- . s, . Applicability::HasPlaceholders, . ); . } . } . . impl<'tcx> LateLintPass<'tcx> for ReserveAfterInitialization { . fn check_block(&mut self, _: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { 5,461 ( 0.00%) self.searcher = None; . } . 12,396 ( 0.00%) fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'tcx>) { 6,198 ( 0.00%) if let Some(init_expr) = local.init 14,024 ( 0.00%) && let PatKind::Binding(BindingMode::MUT, id, _, None) = local.pat.kind 840 ( 0.00%) && !local.span.in_external_macro(cx.sess().source_map()) 1,680 ( 0.00%) && let Some(init) = get_vec_init_kind(cx, init_expr) 19,642 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::get_vec_init_kind (280x) . && !matches!( . init, . VecInitKind::WithExprCapacity(_) | VecInitKind::WithConstCapacity(_) . ) . { 153 ( 0.00%) self.searcher = Some(VecReserveSearcher { . local_id: id, . err_span: local.span, . init_part: snippet( . cx, . local . .span . .shrink_to_lo() 85 ( 0.00%) .to(init_expr.span.source_callsite().shrink_to_lo()), 2,346 ( 0.00%) => ???:::to (17x) 2,108 ( 0.00%) => ???:::source_callsite (17x) . "..", . ) . .into_owned(), . space_hint: String::new(), . }); . } 14,462 ( 0.00%) } . 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 186,370 ( 0.01%) if self.searcher.is_none() 629 ( 0.00%) && let ExprKind::Assign(left, right, _) = expr.kind 2,523 ( 0.00%) && let ExprKind::Path(QPath::Resolved(None, path)) = left.kind 759 ( 0.00%) && let Res::Local(id) = path.res 759 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) 1,518 ( 0.00%) && let Some(init) = get_vec_init_kind(cx, right) 6,272 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:clippy_utils::higher::get_vec_init_kind (253x) . && !matches!( . init, . VecInitKind::WithExprCapacity(_) | VecInitKind::WithConstCapacity(_) . ) . { . self.searcher = Some(VecReserveSearcher { . local_id: id, . err_span: expr.span, -- line 114 ---------------------------------------- -- line 116 ---------------------------------------- . cx, . left.span.shrink_to_lo().to(right.span.source_callsite().shrink_to_lo()), . "..", . ) . .into_owned(), // see `assign_expression` test . space_hint: String::new(), . }); . } 497,168 ( 0.01%) } . 40,040 ( 0.00%) fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { 11,593 ( 0.00%) if let Some(searcher) = self.searcher.take() { 48 ( 0.00%) if let StmtKind::Expr(expr) | StmtKind::Semi(expr) = stmt.kind 38 ( 0.00%) && let ExprKind::MethodCall(name, self_arg, [space_hint], _) = expr.kind 4 ( 0.00%) && 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); . } . } 45,760 ( 0.00%) } . 21,844 ( 0.00%) fn check_block_post(&mut self, cx: &LateContext<'tcx>, _: &'tcx Block<'tcx>) { 10,922 ( 0.00%) if let Some(searcher) = self.searcher.take() { . searcher.display_err(cx); . } 21,844 ( 0.00%) } . } 3,833 ( 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 { 346,136 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 98,896 ( 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. 15,134 ( 0.00%) && let start_offset = BytePos::from_u32(match lit.kind { . LitKind::Str => 1, . LitKind::ByteStr | LitKind::CStr => 2, . _ => return, . }) 3,276 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . { . let s = lit.symbol.as_str(); . let mut iter = s.as_bytes().iter(); 19,416 ( 0.00%) while let Some(&c) = iter.next() { 38,860 ( 0.00%) if c == b'\\' . // Always move the iterator to read the escape char. 56 ( 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; . } . } . } . } 395,584 ( 0.01%) } . } 6,997 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_span/src/edition.rs -------------------------------------------------------------------------------- Ir . use std::fmt; . use std::str::FromStr; . . use rustc_macros::{BlobDecodable, Encodable, StableHash}; . . /// The edition of the compiler. (See [RFC 2052](https://github.com/rust-lang/rfcs/blob/master/text/2052-epochs.md).) 103,385 ( 0.00%) #[derive(Clone, Copy, Hash, PartialEq, PartialOrd, Debug, Encodable, BlobDecodable, Eq)] . #[derive(StableHash)] . pub enum Edition { . // When adding new editions, be sure to do the following: . // . // - update the `ALL_EDITIONS` const . // - update the `EDITION_NAME_LIST` const . // - add a `rust_####()` function to the session . // - update the enum in Cargo's sources as well -- line 15 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: /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 58,326 ( 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 546 ( 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> { 990,141 ( 0.03%) if self < slice.len() { . // SAFETY: `self` is checked to be in bounds. 9,046 ( 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> { 6,024 ( 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()); 2,110 ( 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,068 ( 0.00%) unsafe { slice_get_unchecked(slice, self) } . } . . #[inline] . fn index(self, slice: &[T]) -> &T { . // N.B., use intrinsic indexing 1,415,712 ( 0.04%) &(*slice)[self] . } . . #[inline] . #[rustc_no_writable] . fn index_mut(self, slice: &mut [T]) -> &mut T { . // N.B., use intrinsic indexing 83,148 ( 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 { 9 ( 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,508 ( 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] { 6,619 ( 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 { 92 ( 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] { 81 ( 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 { . let new_len = crate::intrinsics::unchecked_sub(slice.len(), self.start); . &mut *get_offset_len_mut_noubcheck(slice, self.start, new_len) . } . } -- line 565 ---------------------------------------- -- line 673 ---------------------------------------- . // SAFETY: the caller has to uphold the safety contract for `get_unchecked_mut`. . unsafe { self.into_slice_range().get_unchecked_mut(slice) } . } . . #[inline] . fn index(self, slice: &[T]) -> &[T] { . let Self { mut start, mut end, exhausted } = self; . let len = slice.len(); 6 ( 0.00%) if end < len { 3 ( 0.00%) end = end + 1; . start = if exhausted { end } else { start }; . if let Some(new_len) = usize::checked_sub(end, start) { . // SAFETY: `self` is checked to be valid and in bounds above. . unsafe { return &*get_offset_len_noubcheck(slice, start, new_len) } . } . } . slice_index_fail(start, end, slice.len()) . } -- line 690 ---------------------------------------- 166,439 ( 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>) { 5,144 ( 0.00%) if let hir::ItemKind::Fn { ref sig, .. } = item.kind { 512 ( 0.00%) self.check_sig(cx, item.owner_id.def_id, sig.decl); 70,802 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_sig (128x) . } . } . . fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'tcx>) { 5,006 ( 0.00%) if let hir::ImplItemKind::Fn(ref sig, ..) = item.kind 12,010 ( 0.00%) && trait_ref_of_method(cx, item.owner_id).is_none() 357,793 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::trait_ref_of_method (2,402x) . { 6,136 ( 0.00%) self.check_sig(cx, item.owner_id.def_id, sig.decl); 722,076 ( 0.02%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_sig (1,534x) . } . } . . fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'tcx>) { 140 ( 0.00%) if let hir::TraitItemKind::Fn(ref sig, ..) = item.kind { 280 ( 0.00%) self.check_sig(cx, item.owner_id.def_id, sig.decl); 22,943 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_sig (70x) . } . } . . fn check_local(&mut self, cx: &LateContext<'tcx>, local: &hir::LetStmt<'tcx>) { 6,198 ( 0.00%) if let hir::PatKind::Wild = local.pat.kind { . return; . } 13,643 ( 0.00%) self.check_ty_(cx, local.span, cx.typeck_results().pat_ty(local.pat)); 110,071 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_ty_ (1,949x) 78,144 ( 0.00%) => ???:::pat_ty (1,949x) . } . } . . 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) . } . } . 19,052 ( 0.00%) fn check_sig(&mut self, cx: &LateContext<'tcx>, fn_def_id: LocalDefId, decl: &hir::FnDecl<'tcx>) { 1,732 ( 0.00%) let fn_sig = cx.tcx.fn_sig(fn_def_id).instantiate_identity().skip_norm_wip(); 8,559 ( 0.00%) for (hir_ty, ty) in iter::zip(decl.inputs, fn_sig.inputs().skip_binder()) { 14,425 ( 0.00%) self.check_ty_(cx, hir_ty.span, *ty); 209,349 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_ty_ (2,885x) . } 8,660 ( 0.00%) self.check_ty_( 123,300 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/mut_key.rs:::check_ty_ (1,732x) . cx, . decl.output.span(), 5,196 ( 0.00%) cx.tcx.instantiate_bound_regions_with_erased(fn_sig.output()), 232,777 ( 0.01%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_with_erased:: (1,732x) . ); 13,856 ( 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). 52,528 ( 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() 20,400 ( 0.00%) && matches!( 16,344 ( 0.00%) cx.tcx.get_diagnostic_name(def.did()), 244,159 ( 0.01%) => ???:::get_diagnostic_name (4,086x) . Some(sym::HashMap | sym::BTreeMap | sym::HashSet | sym::BTreeSet) . ) . { 16 ( 0.00%) let subst_ty = args.type_at(0); 64 ( 0.00%) if let Some(chain) = self.interior_mut.interior_mut_ty_chain(cx, subst_ty) { 9,541 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:::interior_mut_ty_chain (16x) . 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" . ))); . } . }); . } . } 39,396 ( 0.00%) } . } 4,185 ( 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 { 497,168 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 124,292 ( 0.00%) if expr.span.from_expansion() { . return; . } . 4,796 ( 0.00%) let Some((cond, keyword, desc)) = higher::If::hir(expr) . .map(|hif| (hif.cond, "if", "an `if` condition")) 2,134 ( 0.00%) .or(if let ExprKind::Match(match_ex, _, MatchSource::Normal) = expr.kind { . Some((match_ex, "match", "a `match` scrutinee")) . } else { . None . }) . else { . return; . }; 3,597 ( 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`", . ); . 2,398 ( 0.00%) if let ExprKind::Block(block, _) = &cond.kind { . 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 { -- line 83 ---------------------------------------- -- line 129 ---------------------------------------- . "let res = {}; {keyword} res", . snippet_block_with_applicability(cx, block.span, "..", Some(expr.span), &mut applicability), . ), . applicability, . ); . } . } . } 497,168 ( 0.01%) } . } 2,939 ( 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 { 147,858 ( 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 { 2,050 ( 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 { 33,093 ( 0.00%) move |acc, elt| g(acc, f(elt)) 851 ( 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 &mut core::iter::adapters::map::map_try_fold, core::option::Option<(rustc_middle::ty::Ty, clippy_lints::loops::manual_memcpy::IndexExpr, clippy_lints::loops::manual_memcpy::IndexExpr)>, (), core::ops::control_flow::ControlFlow>, clippy_lints::loops::manual_memcpy::check::{closure#0}, core::iter::adapters::map::map_try_fold, core::option::Option, (), core::ops::control_flow::ControlFlow>, clippy_lints::loops::manual_memcpy::check::{closure#1}, , clippy_lints::loops::manual_memcpy::get_assignments::{closure#0}>, core::option::IntoIter<&rustc_hir::hir::Expr>>, clippy_lints::loops::manual_memcpy::get_assignments::{closure#1}>, clippy_lints::loops::manual_memcpy::get_assignment>>>, core::option::IntoIter>>, clippy_lints::loops::manual_memcpy::check::{closure#0}>, clippy_lints::loops::manual_memcpy::check::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::try_fold<(), core::iter::traits::iterator::Iterator::try_for_each::call, core::ops::control_flow::ControlFlow::Break>::{closure#0}, core::ops::control_flow::ControlFlow>::{closure#0}>::{closure#0}>::{closure#0} as core::ops::function::FnMut<((), core::option::Option<(&rustc_hir::hir::Expr, &rustc_hir::hir::Expr)>)>>::call_mut (34x) . } . . #[stable(feature = "rust1", since = "1.0.0")] . impl Iterator for Map . where . F: FnMut(I::Item) -> B, . { . type Item = B; . . #[inline] 4,602 ( 0.00%) fn next(&mut self) -> Option { 82,435 ( 0.00%) self.iter.next().map(&mut self.f) 1,040,652 ( 0.03%) => ???:::next (13,477x) 4,014 ( 0.00%) } . . #[inline] . fn size_hint(&self) -> (usize, Option) { . self.iter.size_hint() . } . 623,479 ( 0.02%) fn try_fold(&mut self, init: Acc, g: G) -> R . where . Self: Sized, . G: FnMut(Acc, Self::Item) -> R, . R: Try, . { 276 ( 0.00%) self.iter.try_fold(init, map_try_fold(&mut self.f, g)) 5,127 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/adapters/chain.rs:, clippy_lints::loops::manual_memcpy::get_assignments::{closure#0}>, core::option::IntoIter<&rustc_hir::hir::Expr>>, clippy_lints::loops::manual_memcpy::get_assignments::{closure#1}>, clippy_lints::loops::manual_memcpy::get_assignment>>>, core::option::IntoIter>> as core::iter::traits::iterator::Iterator>::try_fold::<(), core::iter::adapters::map::map_try_fold, core::option::Option<(rustc_middle::ty::Ty, clippy_lints::loops::manual_memcpy::IndexExpr, clippy_lints::loops::manual_memcpy::IndexExpr)>, (), core::ops::control_flow::ControlFlow>, clippy_lints::loops::manual_memcpy::check::{closure#0}, core::iter::adapters::map::map_try_fold, core::option::Option, (), core::ops::control_flow::ControlFlow>, clippy_lints::loops::manual_memcpy::check::{closure#1}, , clippy_lints::loops::manual_memcpy::get_assignments::{closure#0}>, core::option::IntoIter<&rustc_hir::hir::Expr>>, clippy_lints::loops::manual_memcpy::get_assignments::{closure#1}>, clippy_lints::loops::manual_memcpy::get_assignment>>>, core::option::IntoIter>>, clippy_lints::loops::manual_memcpy::check::{closure#0}>, clippy_lints::loops::manual_memcpy::check::{closure#1}>, core::option::Option> as core::iter::traits::iterator::Iterator>::try_fold<(), core::iter::traits::iterator::Iterator::try_for_each::call, core::ops::control_flow::ControlFlow::Break>::{closure#0}, core::ops::control_flow::ControlFlow>::{closure#0}>::{closure#0}>::{closure#0}, core::ops::control_flow::ControlFlow>> (34x) 498,256 ( 0.01%) } . 50,743 ( 0.00%) fn fold(self, init: Acc, g: G) -> Acc . where . G: FnMut(Acc, Self::Item) -> Acc, . { 1,442 ( 0.00%) self.iter.fold(init, map_fold(self.f, g)) 46,720 ( 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 ---------------------------------------- 37,727 ( 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 1327 ---------------------------------------- . /// non-copy and *might* have a destructor attached; if it returns . /// `false`, then `ty` definitely has no destructor (i.e., no drop glue). . /// . /// (Note that this implies that if `ty` has a destructor attached, . /// then `needs_drop` will definitely return `true` for `ty`.) . /// . /// Note that this method is used to check eligible types in unions. . #[inline] 30 ( 0.00%) pub fn needs_drop(self, tcx: TyCtxt<'tcx>, typing_env: ty::TypingEnv<'tcx>) -> bool { . // Avoid querying in simple cases. 6 ( 0.00%) match needs_drop_components(tcx, self) { . Err(AlwaysRequiresDrop) => true, 3 ( 0.00%) Ok(components) => { . let query_ty = match *components { 6 ( 0.00%) [] => return false, . // If we've got a single component, call the query with that . // to increase the chance that we hit the query cache. 3 ( 0.00%) [component_ty] => component_ty, . _ => self, . }; . . // This doesn't depend on regions, so try to minimize distinct . // query keys used. If normalization fails, we just use `query_ty`. . debug_assert!(!typing_env.param_env.has_infer()); . let query_ty = tcx . .try_normalize_erasing_regions(typing_env, Unnormalized::new_wip(query_ty)) . .unwrap_or_else(|_| tcx.erase_and_anonymize_regions(query_ty)); . . tcx.needs_drop_raw(typing_env.as_query_input(query_ty)) . } . } 27 ( 0.00%) } . . /// If `ty.needs_async_drop(...)` returns `true`, then `ty` is definitely . /// non-copy and *might* have a async destructor attached; if it returns . /// `false`, then `ty` definitely has no async destructor (i.e., no async . /// drop glue). . /// . /// (Note that this implies that if `ty` has an async destructor attached, . /// then `needs_async_drop` will definitely return `true` for `ty`.) -- line 1366 ---------------------------------------- -- line 1398 ---------------------------------------- . /// . /// Note that this method can return false even if `ty` has a destructor . /// attached; even if that is the case then the adt has been marked with . /// the attribute `rustc_insignificant_dtor`. . /// . /// Note that this method is used to check for change in drop order for . /// 2229 drop reorder migration analysis. . #[inline] 44 ( 0.00%) pub fn has_significant_drop(self, tcx: TyCtxt<'tcx>, typing_env: ty::TypingEnv<'tcx>) -> bool { . // Avoid querying in simple cases. 64 ( 0.00%) match needs_drop_components(tcx, self) { . Err(AlwaysRequiresDrop) => true, 32 ( 0.00%) Ok(components) => { . let query_ty = match *components { 106 ( 0.00%) [] => return false, . // If we've got a single component, call the query with that . // to increase the chance that we hit the query cache. 19 ( 0.00%) [component_ty] => component_ty, . _ => self, . }; . . // FIXME . // We should be canonicalizing, or else moving this to a method of inference . // context, or *something* like that, . // but for now just avoid passing inference variables . // to queries that can't cope with them. . // Instead, conservatively return "true" (may change drop order). 19 ( 0.00%) if query_ty.has_infer() { . return true; . } . . // This doesn't depend on regions, so try to minimize distinct . // query keys used. . // FIX: Use try_normalize to avoid crashing. If it fails, return true. . tcx.try_normalize_erasing_regions(typing_env, Unnormalized::new_wip(query_ty)) . .map(|erased| tcx.has_significant_drop_raw(typing_env.as_query_input(erased))) . .unwrap_or(true) . } . } 32 ( 0.00%) } . . /// Returns `true` if equality for this type is both reflexive and structural. . /// . /// Reflexive equality for a type is indicated by an `Eq` impl for that type. . /// . /// Primitive types (`u32`, `str`) have structural equality by definition. For composite data . /// types, equality for the type as a whole is structural when it is the same as equality . /// between all components (fields, array elements, etc.) of that type. For ADTs, structural -- line 1445 ---------------------------------------- -- 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; 108,323 ( 0.00%) while let ty::Ref(_, inner_ty, _) = ty.kind() { 4,312 ( 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 1517 ---------------------------------------- . // . // FIXME(zetanumbers): consider replacing this with only . // `needs_drop_components_with_async` . #[inline] . pub fn needs_drop_components<'tcx>( . tcx: TyCtxt<'tcx>, . ty: Ty<'tcx>, . ) -> Result; 2]>, AlwaysRequiresDrop> { 145 ( 0.00%) needs_drop_components_with_async(tcx, ty, Asyncness::No) 563 ( 0.00%) => ???:rustc_middle::ty::util::needs_drop_components_with_async (16x) . } . . /// 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. . pub fn needs_drop_components_with_async<'tcx>( . tcx: TyCtxt<'tcx>, . ty: Ty<'tcx>, -- line 1533 ---------------------------------------- -- line 1597 ---------------------------------------- . } . } . . /// Does the equivalent of . /// ```ignore (illustrative) . /// let v = self.iter().map(|p| p.fold_with(folder)).collect::>(); . /// folder.tcx().intern_*(&v) . /// ``` 433 ( 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, . { . let slice = list.as_ref(); . let mut iter = slice.iter().copied(); . // Look for the first element that changed . match iter.by_ref().enumerate().find_map(|(i, t)| { 225 ( 0.00%) let new_t = t.fold_with(folder); . 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 { 2,468 ( 0.00%) new_list.push(t.fold_with(folder)) . } 2,202 ( 0.00%) intern(folder.cx(), &new_list) . } . None => list, . } 486 ( 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 ---------------------------------------- 8,838 ( 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 { 12,628 ( 0.00%) fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) { 3,976 ( 0.00%) if let ItemKind::Use(use_tree) = &item.kind . && let UseTreeKind::Nested { items, .. } = &use_tree.kind 218 ( 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"); . }, . ); . } 14,432 ( 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 { 20,576 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 3,752 ( 0.00%) if has_attr(cx, item.hir_id()) { . println!("{item:#?}"); . } 20,576 ( 0.00%) } . 497,168 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'_>) { 187,801 ( 0.01%) if has_attr(cx, expr.hir_id) { . println!("{expr:#?}"); . } 497,168 ( 0.01%) } . 51,480 ( 0.00%) fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx hir::Stmt<'_>) { 26,462 ( 0.00%) match stmt.kind { 14,348 ( 0.00%) hir::StmtKind::Expr(e) | hir::StmtKind::Semi(e) if has_attr(cx, e.hir_id) => return, . _ => {}, . } 13,573 ( 0.00%) if has_attr(cx, stmt.hir_id) { . println!("{stmt:#?}"); . } 45,760 ( 0.00%) } . 560 ( 0.00%) fn check_trait_item(&mut self, cx: &LateContext<'_>, item: &TraitItem<'_>) { 107 ( 0.00%) if has_attr(cx, item.hir_id()) { . println!("{item:#?}"); . } 560 ( 0.00%) } . 20,024 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'_>, item: &hir::ImplItem<'_>) { 4,462 ( 0.00%) if has_attr(cx, item.hir_id()) { . println!("{item:#?}"); . } 20,024 ( 0.00%) } . } . . fn has_attr(cx: &LateContext<'_>, hir_id: hir::HirId) -> bool { 161,928 ( 0.00%) let attrs = cx.tcx.hir_attrs(hir_id); 700,492 ( 0.02%) => ???:::hir_attrs (9,307x) 4,539 ( 0.00%) get_builtin_attr(attrs, sym::dump).count() > 0 . } 9,078 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/rc_buffer.rs -------------------------------------------------------------------------------- Ir -- line 5 ---------------------------------------- . use rustc_errors::Applicability; . use rustc_hir::def_id::DefId; . use rustc_hir::{QPath, Ty, TyKind}; . use rustc_lint::LateContext; . use std::borrow::Cow; . . use super::RC_BUFFER; . 26,480 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, hir_ty: &Ty<'_>, qpath: &QPath<'_>, def_id: DefId) -> bool { 2,648 ( 0.00%) let mut app = Applicability::Unspecified; 23,802 ( 0.00%) let rc = match cx.tcx.get_diagnostic_name(def_id) { 163,600 ( 0.00%) => ???:::get_diagnostic_name (2,648x) . Some(sym::Rc) => "Rc", . Some(sym::Arc) => "Arc", . _ => return false, . }; 32 ( 0.00%) if let Some(ty) = qpath_generic_tys(qpath).next() 304 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::qpath_generic_tys (16x) . && let Some(alternate) = match_buffer_type(cx, ty, &mut app) . { . span_lint_and_then( . cx, . RC_BUFFER, . hir_ty.span, . format!("usage of `{rc}` when `T` is a buffer type"), . |diag| { . diag.span_suggestion_verbose(ty.span, "try", alternate, app); . }, . ); . true . } else { . false . } 21,184 ( 0.00%) } . . fn match_buffer_type( . cx: &LateContext<'_>, . ty: &Ty<'_>, . applicability: &mut Applicability, . ) -> Option> { . let id = ty.basic_res().opt_def_id()?; 50 ( 0.00%) let path = match cx.tcx.get_diagnostic_name(id) { 299 ( 0.00%) => ???:::get_diagnostic_name (5x) . Some(sym::OsString) => "std::ffi::OsStr".into(), . Some(sym::PathBuf) => "std::path::Path".into(), . Some(sym::Vec) => { . let TyKind::Path(vec_qpath) = &ty.kind else { . return None; . }; . let vec_generic_ty = qpath_generic_tys(vec_qpath).next()?; . let snippet = snippet_with_applicability(cx, vec_generic_ty.span, "_", applicability); . format!("[{snippet}]").into() . }, 10 ( 0.00%) _ if Some(id) == cx.tcx.lang_items().string() => "str".into(), 200 ( 0.00%) => ???:::lang_items (5x) . _ => return None, . }; . Some(path) . } 86 ( 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' 5,006 ( 0.00%) if let ImplItemKind::Fn(ref signature, _) = impl_item.kind . // #11201 4,804 ( 0.00%) && let header = signature.header . && header.is_safe() 16,737 ( 0.00%) && header.abi == ExternAbi::Rust 112,377 ( 0.00%) => ???:::eq (2,391x) . && 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); . } 2,503 ( 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 ---------------------------------------- 31,226 ( 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 20 ---------------------------------------- . use crate::ty::AliasTy; . use crate::{ . self as ty, BoundVarIndexKind, FloatTy, FreeAliasTy, InherentAliasTy, IntTy, Interner, . OpaqueAliasTy, ProjectionAliasTy, Region, UintTy, Unnormalized, . }; . . mod closure; . 12 ( 0.00%) #[derive_where(Clone, Copy, Hash, PartialEq, Eq, Debug; I: Interner)] . #[derive(TypeVisitable_Generic, GenericTypeVisitable, TypeFoldable_Generic, Lift_Generic)] . #[cfg_attr( . feature = "nightly", . derive(Encodable_NoContext, Decodable_NoContext, StableHash_NoContext) . )] . pub enum AliasTyKind { . /// A projection `::AssocType`. . /// -- line 36 ---------------------------------------- -- line 111 ---------------------------------------- . /// aliases which cannot be further normalized in their current scope normalize to themselves . /// with `IsRigid::Yes`. At this point we no longer have to try and renormalize this alias . /// later on. . /// . /// FIXME(#155345): Alias handling is currently still in flux for the new trait . /// solver and this is currently somewhat messy. Please reach out on . /// #t-types/trait-system-refactor-initiative if you encounter this and it isn't . /// immediately clear what to do. 8 ( 0.00%) #[derive(Debug, Clone, Copy, Hash, PartialEq)] . #[derive(TypeVisitable_Generic, GenericTypeVisitable, TypeFoldable_Generic)] . #[cfg_attr( . feature = "nightly", . derive(Decodable_NoContext, Encodable_NoContext, StableHash_NoContext) . )] . pub enum IsRigid { . Yes, . No, -- line 127 ---------------------------------------- -- 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")] 67,984 ( 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 1080 ---------------------------------------- . /// Get the ABI, including the unwind flag. . pub fn abi(self) -> ExternAbi { . let abi_index = self.flags & Self::EXTERN_ABI_MASK; . ExternAbi::from_packed(abi_index) . } . . /// Get the safety flag. . pub fn is_safe(self) -> bool { 33 ( 0.00%) self.flags & Self::SAFE_FLAG != 0 . } . . /// Returns the safety mode. . pub fn safety(self) -> I::Safety { . if self.is_safe() { I::Safety::safe() } else { I::Safety::unsafe_mode() } . } . . /// Do the function arguments end with a C-style variadic argument? . pub fn c_variadic(self) -> bool { 990 ( 0.00%) self.flags & Self::C_VARIADIC_FLAG != 0 . } . . /// Get the index of the splatted argument, if any. . pub fn splatted(self) -> Option { . if self.splatted == Self::NO_SPLATTED_ARG_INDEX { None } else { Some(self.splatted) } . } . } . . #[derive_where(Clone, Copy, PartialEq, Hash; I: Interner)] . #[cfg_attr( . feature = "nightly", . derive(Encodable_NoContext, Decodable_NoContext, StableHash_NoContext) . )] 4,493 ( 0.00%) #[derive(TypeVisitable_Generic, GenericTypeVisitable, TypeFoldable_Generic, Lift_Generic)] 298 ( 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::> (1x) . pub struct FnSig { 1 ( 0.00%) pub inputs_and_output: I::Tys, 4,413 ( 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 { 11,512 ( 0.00%) self.inputs_and_output.inputs() 14 ( 0.00%) => ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::inherent::Tys>::inputs (2x) . } . . pub fn output(self) -> I::Ty { 15,053 ( 0.00%) self.inputs_and_output.output() 1,395 ( 0.00%) => ???:<&rustc_middle::ty::list::RawList<(), rustc_middle::ty::Ty> as rustc_type_ir::inherent::Tys>::output (279x) . } . . pub fn is_fn_trait_compatible(self) -> bool { . !self.c_variadic() && self.safety().is_safe() && self.abi() == ExternAbi::Rust . } . . /// Set the safety flag. . #[must_use = "this method does not modify the receiver"] -- line 1136 ---------------------------------------- -- line 1176 ---------------------------------------- . #[inline] . pub fn inputs(self) -> ty::Binder { . self.map_bound(|fn_sig| fn_sig.inputs()) . } . . #[inline] . #[track_caller] . pub fn input(self, index: usize) -> ty::Binder { 1 ( 0.00%) self.map_bound(|fn_sig| fn_sig.inputs().get(index).unwrap()) . } . . pub fn inputs_and_output(self) -> ty::Binder { . self.map_bound(|fn_sig| fn_sig.inputs_and_output) . } . . #[inline] . pub fn output(self) -> ty::Binder { -- line 1192 ---------------------------------------- 16,120 ( 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; . 11,830 ( 0.00%) pub(crate) fn check<'tcx>( . cx: &LateContext<'tcx>, . expr: &'tcx Expr<'_>, . op: BinOpKind, . left: &'tcx Expr<'_>, . right: &'tcx Expr<'_>, . ) { 1,742 ( 0.00%) if op == BinOpKind::Div . && let ExprKind::MethodCall(method_path, self_arg, [], _) = left.kind 2 ( 0.00%) && cx . .typeck_results() 8 ( 0.00%) .expr_ty(self_arg) 172 ( 0.00%) => ???:::expr_ty (4x) . .peel_refs() . .is_diag_item(cx, sym::Duration) . && let Some(Constant::Int(divisor)) = ConstEvalCtxt::new(cx).eval_local(right, expr.span.ctxt()) . { . let suggested_fn = match (method_path.ident.name, divisor) { . (sym::subsec_micros, 1_000) | (sym::subsec_nanos, 1_000_000) => "subsec_millis", . (sym::subsec_nanos, 1_000) => "subsec_micros", . _ => return, -- line 31 ---------------------------------------- -- line 39 ---------------------------------------- . "try", . format!( . "{}.{suggested_fn}()", . snippet_with_applicability(cx, self_arg.span, "_", &mut applicability) . ), . applicability, . ); . } 13,520 ( 0.00%) } 4 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs -------------------------------------------------------------------------------- Ir -- line 621 ---------------------------------------- . /// assert!(ascii.is_ascii()); . /// assert!(!non_ascii.is_ascii()); . /// ``` . #[must_use] . #[stable(feature = "ascii_methods_on_intrinsics", since = "1.23.0")] . #[rustc_const_stable(feature = "const_u8_is_ascii", since = "1.43.0")] . #[inline] . pub const fn is_ascii(&self) -> bool { 3,450 ( 0.00%) *self <= 127 . } . . /// If the value of this byte is within the ASCII range, returns it as an . /// [ASCII character](ascii::Char). Otherwise, returns `None`. . #[must_use] . #[unstable(feature = "ascii_char", issue = "110998")] . #[inline] . pub const fn as_ascii(&self) -> Option { -- line 637 ---------------------------------------- -- line 847 ---------------------------------------- . /// assert!(!lf.is_ascii_uppercase()); . /// assert!(!esc.is_ascii_uppercase()); . /// ``` . #[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_uppercase(&self) -> bool { 1,004 ( 0.00%) matches!(*self, b'A'..=b'Z') . } . . /// Checks if the value is an ASCII lowercase character: . /// U+0061 'a' ..= U+007A 'z'. . /// . /// # Examples . /// . /// ``` -- line 863 ---------------------------------------- -- line 952 ---------------------------------------- . /// 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 { 3,568 ( 0.00%) matches!(*self, b'0'..=b'9') . } . . /// Checks if the value is an ASCII octal digit: . /// U+0030 '0' ..= U+0037 '7'. . /// . /// # Examples . /// . /// ``` -- line 968 ---------------------------------------- -- line 1020 ---------------------------------------- . /// assert!(!lf.is_ascii_hexdigit()); . /// assert!(!esc.is_ascii_hexdigit()); . /// ``` . #[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_hexdigit(&self) -> bool { 60 ( 0.00%) matches!(*self, b'0'..=b'9') | matches!(*self, b'A'..=b'F') | matches!(*self, b'a'..=b'f') . } . . /// Checks if the value is an ASCII punctuation or symbol character . /// (i.e. not alphanumeric, whitespace, or control): . /// . /// - U+0021 ..= U+002F `! " # $ % & ' ( ) * + , - . /`, or . /// - U+003A ..= U+0040 `: ; < = > ? @`, or . /// - U+005B ..= U+0060 `` [ \ ] ^ _ ` ``, or -- line 1036 ---------------------------------------- -- line 1218 ---------------------------------------- . #[inline] . pub fn escape_ascii(self) -> ascii::EscapeDefault { . ascii::escape_default(self) . } . . #[inline] . pub(crate) const fn is_utf8_char_boundary(self) -> bool { . // This is bit magic equivalent to: b < 128 || b >= 192 113,476 ( 0.00%) (self as i8) >= -0x40 . } . } . . impl u16 { . uint_impl! { . Self = u16, . ActualT = u16, . SignedT = i16, -- line 1234 ---------------------------------------- 6,143 ( 0.00%) -------------------------------------------------------------------------------- -- 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; . 66,983 ( 0.00%) pub(super) fn check(cx: &EarlyContext<'_>, pat: &Pat) { 66,983 ( 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, . ); . } 76,552 ( 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 { 31,893 ( 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 { 155,120 ( 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),* $(,)?) => {{ 948 ( 0.00%) $(try_visit!(Visitable::visit($expr, $visitor, ()));)* 722 ( 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 (19x) . }}; . } . . 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, ) => { 119,353 ( 0.00%) Walkable::walk_ref($expr, $visitor) 41,432 ( 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 (304x) . }; . } . . 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 { 297,269 ( 0.01%) fn walk_ref(&$lt $self, $vis: &mut $vis_ty) -> V::Result { . $block 254,952 ( 0.01%) } . } . }; . } . . macro_rules! impl_visitable_noop { . (<$lt:lifetime> $($ty:ty,)*) => { . $( . impl_visitable!(|&$lt self: $ty, _vis: &mut V, _extra: ()| { -- line 250 ---------------------------------------- -- line 273 ---------------------------------------- . })* . }; . } . . macro_rules! impl_visitable_direct { . (<$lt:lifetime> $($ty:ty,)*) => { . $(impl_visitable!( . |&$lt self: $ty, visitor: &mut V, _extra: ()| { 27 ( 0.00%) Walkable::walk_ref(self, visitor) . } . );)* . }; . } . . macro_rules! impl_visitable_calling_walkable { . (<$lt:lifetime> . $( fn $method:ident($ty:ty $(, $extra_name:ident: $extra_ty:ty)?); )* . ) => { . $(fn $method(&mut self, node: &$lt $ty $(, $extra_name:$extra_ty)?) -> Self::Result { . impl_visitable!(|&$lt self: $ty, visitor: &mut V, extra: ($($extra_ty)?)| { . let ($($extra_name)?) = extra; 12,076 ( 0.00%) visitor.$method(self $(, $extra_name)?) 1,506,385 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_block (985x) . }); . 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 { 269 ( 0.00%) walk_fn(self, fk) 7,477 ( 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:: (12x) . } . . // (non-mut) `Visitor`-only methods . $( . fn visit_stmt(&mut self, s: &$lt Stmt) -> Self::Result { 20,518 ( 0.00%) walk_stmt(self, s) 3,882,535 ( 0.11%) => /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:: (4,420x) . } . . fn visit_nested_use_tree(&mut self, use_tree: &$lt UseTree, id: NodeId) -> Self::Result { . try_visit!(self.visit_id(id)); . self.visit_use_tree(use_tree) . } . )? . -- line 677 ---------------------------------------- -- line 738 ---------------------------------------- . fn flat_map_where_predicate( . &mut self, . where_predicate: WherePredicate, . ) -> SmallVec<[WherePredicate; 1]> { . walk_flat_map_where_predicate(self, where_predicate) . } . . fn flat_map_pat_field(&mut self, fp: PatField) -> SmallVec<[PatField; 1]> { 1,716 ( 0.00%) walk_flat_map_pat_field(self, fp) 35,535 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_ast/src/mut_visit.rs:rustc_ast::mut_visit::walk_flat_map_pat_field:: (429x) . } . )? . } . . pub trait WalkItemKind { . type Ctxt; . fn walk<$($lt,)? V: $Visitor$(<$lt>)?>( . &$($lt)? $($mut)? self, -- line 754 ---------------------------------------- -- line 922 ---------------------------------------- . visit_visitable!($($mut)? vis, alias), . ForeignItemKind::MacCall(mac) => . visit_visitable!($($mut)? vis, mac), . } . V::Result::output() . } . } . 2,152 ( 0.00%) pub fn walk_fn<$($lt,)? V: $Visitor$(<$lt>)?>(vis: &mut V, kind: FnKind<$($lt)? $(${ignore($mut)} '_)?>) -> V::Result { 807 ( 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 . ); . } 269 ( 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; 6,586 ( 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); 213,320 ( 0.01%) match kind { . ExprKind::Array(exprs) => . visit_visitable!($($mut)? vis, exprs), . ExprKind::ConstBlock(anon_const) => . visit_visitable!($($mut)? vis, anon_const), . ExprKind::Repeat(element, count) => . visit_visitable!($($mut)? vis, element, count), . ExprKind::Struct(se) => . visit_visitable!($($mut)? vis, se), -- line 981 ---------------------------------------- -- line 994 ---------------------------------------- . ExprKind::Cast(subexpression, typ) | ExprKind::Type(subexpression, typ) => . visit_visitable!($($mut)? vis, subexpression, typ), . ExprKind::Let(pat, expr, span, _recovered) => . visit_visitable!($($mut)? vis, pat, expr, span), . ExprKind::If(head_expression, if_block, optional_else) => . visit_visitable!($($mut)? vis, head_expression, if_block, optional_else), . ExprKind::While(subexpression, block, opt_label) => . visit_visitable!($($mut)? vis, subexpression, block, opt_label), 176 ( 0.00%) ExprKind::ForLoop(ForLoop { pat, iter, body, label, kind }) => . visit_visitable!($($mut)? vis, pat, iter, body, label, kind), . ExprKind::Loop(block, opt_label, span) => . visit_visitable!($($mut)? vis, block, opt_label, span), . ExprKind::Match(subexpression, arms, kind) => . visit_visitable!($($mut)? vis, subexpression, arms, kind), . ExprKind::Closure(Closure { 269 ( 0.00%) binder, . capture_clause, 269 ( 0.00%) coroutine_kind, . constness, . movability, 269 ( 0.00%) fn_decl, 269 ( 0.00%) body, . fn_decl_span, . fn_arg_span, . }) => { . visit_visitable!($($mut)? vis, constness, movability, capture_clause); 1,076 ( 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); 269 ( 0.00%) } . ExprKind::Block(block, opt_label) => . visit_visitable!($($mut)? vis, block, opt_label), . ExprKind::Gen(capt, body, kind, decl_span) => . visit_visitable!($($mut)? vis, capt, body, kind, decl_span), . ExprKind::Await(expr, span) . | ExprKind::Move(expr, span) . | ExprKind::Use(expr, span) => . visit_visitable!($($mut)? vis, expr, span), . ExprKind::Assign(lhs, rhs, span) => . visit_visitable!($($mut)? vis, lhs, rhs, span), . ExprKind::AssignOp(op, lhs, rhs) => . visit_visitable!($($mut)? vis, op, lhs, rhs), 68 ( 0.00%) ExprKind::Field(subexpression, ident) => 68 ( 0.00%) visit_visitable!($($mut)? vis, subexpression, ident), . ExprKind::Index(main_expression, index_expression, span) => . visit_visitable!($($mut)? vis, main_expression, index_expression, span), . ExprKind::Range(start, end, limit) => . visit_visitable!($($mut)? vis, start, end, limit), . ExprKind::Underscore => {} . ExprKind::Path(maybe_qself, path) => . visit_visitable!($($mut)? vis, maybe_qself, path), . ExprKind::Break(opt_label, opt_expr) => -- line 1045 ---------------------------------------- -- line 1161 ---------------------------------------- . . fn $name<'a, V: Visitor<'a>>( . vis: &mut V, . values: &'a ThinVec<$Ty>, . $( . $param: $ParamTy, . )* . ) -> V::Result { 9,617 ( 0.00%) walk_list!(vis, $visit_fn, values$(,$param)*); 485,546 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_arm (596x) . 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; . } . 64,392 ( 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)); 40,245 ( 0.00%) match kind { 15,620 ( 0.00%) StmtKind::Let(local) => try_visit!(visitor.visit_local(local)), 1,302,070 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/non_expressive_names.rs:::visit_local (1,042x) . StmtKind::Item(item) => try_visit!(visitor.visit_item(item)), 6,232 ( 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() 2,040 ( 0.00%) } 121,787 ( 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 { 310,730 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 126,056 ( 0.00%) if let ExprKind::Struct(_, fields, StructTailExpr::Base(base)) = expr.kind { 36 ( 0.00%) let ty = cx.typeck_results().expr_ty(expr); 720 ( 0.00%) => ???:::expr_ty (18x) 36 ( 0.00%) if let ty::Adt(def, _) = ty.kind() 72 ( 0.00%) && fields.len() == def.non_enum_variant().fields.len() 144 ( 0.00%) => ???:::non_enum_variant (18x) . && !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", . ); . } . } 372,876 ( 0.01%) } . } 72 ( 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; . 6,374 ( 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; 15,935 ( 0.00%) while let Some(parent) = get_parent_expr(cx, expr) 382,235 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (3,187x) 4,643 ( 0.00%) && let ExprKind::Call(recv, _) = parent.kind . && expr.span == recv.span . { . expr = parent; . depth += 1; . } . (expr, depth) . } . . impl<'tcx> LateLintPass<'tcx> for RedundantClosureCall { 497,168 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { 340,310 ( 0.01%) if expr.span.in_external_macro(cx.sess().source_map()) { . return; . } . 3,187 ( 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. 6,374 ( 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!()`. 6,374 ( 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); . } . }, . ); . } 497,168 ( 0.01%) } . 38,227 ( 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 . } . 6,644 ( 0.00%) for w in block.stmts.windows(2) { 7,186 ( 0.00%) if let hir::StmtKind::Let(local) = w[0].kind 4,302 ( 0.00%) && let Some(t) = local.init 2,780 ( 0.00%) && let ExprKind::Closure { .. } = t.kind 42 ( 0.00%) && let hir::PatKind::Binding(_, _, ident, _) = local.pat.kind 29 ( 0.00%) && let hir::StmtKind::Semi(second) = w[1].kind 3 ( 0.00%) && let ExprKind::Assign(_, call, _) = second.kind 2 ( 0.00%) && 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 . { . span_lint_hir( . cx, . REDUNDANT_CLOSURE_CALL, . second.hir_id, . second.span, . "closure called just once immediately after it was declared", . ); . } . } 43,688 ( 0.00%) } . } 25,807 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/types/box_collection.rs -------------------------------------------------------------------------------- Ir -- line 3 ---------------------------------------- . use clippy_utils::{qpath_generic_tys, sym}; . use rustc_hir::def_id::DefId; . use rustc_hir::{self as hir, QPath}; . use rustc_lint::LateContext; . use rustc_span::Symbol; . . use super::BOX_COLLECTION; . 31,776 ( 0.00%) pub(super) fn check(cx: &LateContext<'_>, hir_ty: &hir::Ty<'_>, qpath: &QPath<'_>, def_id: DefId) -> bool { 7,953 ( 0.00%) if Some(def_id) == cx.tcx.lang_items().owned_box() 105,920 ( 0.00%) => ???:::lang_items (2,648x) . && let Some(item_type) = get_std_collection(cx, qpath) . { . let generic = match item_type { . sym::String => "", . _ => "<..>", . }; . . let box_content = format!("{item_type}{generic}"); -- line 20 ---------------------------------------- -- line 25 ---------------------------------------- . format!("you seem to be trying to use `Box<{box_content}>`. Consider using just `{box_content}`"), . None, . format!("`{box_content}` is already on the heap, `Box<{box_content}>` makes an extra allocation"), . ); . true . } else { . false . } 21,184 ( 0.00%) } . . fn get_std_collection(cx: &LateContext<'_>, qpath: &QPath<'_>) -> Option { 18 ( 0.00%) let param = qpath_generic_tys(qpath).next()?; 171 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::qpath_generic_tys (9x) . let id = param.basic_res().opt_def_id()?; . cx.tcx 32 ( 0.00%) .get_diagnostic_name(id) 424 ( 0.00%) => ???:::get_diagnostic_name (8x) . .filter(|&name| { . matches!( . name, . sym::HashMap . | sym::Vec . | sym::HashSet . | sym::VecDeque . | sym::LinkedList . | sym::BTreeMap . | sym::BTreeSet . | sym::BinaryHeap . ) . }) . .or_else(|| { . cx.tcx 16 ( 0.00%) .lang_items() 320 ( 0.00%) => ???:::lang_items (8x) . .string() . .filter(|did| id == *did) . .map(|_| sym::String) . }) . } 2,657 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/unit_types/let_unit_value.rs -------------------------------------------------------------------------------- Ir -- line 11 ---------------------------------------- . use rustc_lint::{LateContext, LintContext as _}; . use rustc_middle::ty; . use rustc_span::Span; . . use super::LET_UNIT_VALUE; . . pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, format_args: &FormatArgsStorage, local: &'tcx LetStmt<'_>) { . // skip `let () = { ... }` 6,198 ( 0.00%) if let PatKind::Tuple(fields, ..) = local.pat.kind 100 ( 0.00%) && fields.is_empty() . { . return; . } . 6,198 ( 0.00%) if let Some(init) = local.init 3,912 ( 0.00%) && !local.pat.span.from_expansion() 4,539 ( 0.00%) && !local.span.in_external_macro(cx.sess().source_map()) 4,539 ( 0.00%) && !local.span.is_from_async_await() 154,326 ( 0.00%) => ???:::is_from_async_await (1,513x) 3,129 ( 0.00%) && cx.typeck_results().pat_ty(local.pat).is_unit() 60,668 ( 0.00%) => ???:::pat_ty (1,513x) . { . // skip `let awa = ()` 3 ( 0.00%) if let ExprKind::Tup([]) = init.kind { . return; . } . . // skip `let _: () = { ... }` 3 ( 0.00%) if let Some(ty) = local.ty . && let TyKind::Tup([]) = ty.kind . { . return; . } . . if (local.ty.is_some_and(|ty| !matches!(ty.kind, TyKind::Infer(()))) 2 ( 0.00%) || matches!(local.pat.kind, PatKind::Tuple([], ddpos) if ddpos.as_opt_usize().is_none())) . && expr_needs_inferred_result(cx, init) . { . if !matches!(local.pat.kind, PatKind::Wild) . && !matches!(local.pat.kind, PatKind::Tuple([], ddpos) if ddpos.as_opt_usize().is_none()) . { . span_lint_and_then( . cx, . LET_UNIT_VALUE, -- line 52 ---------------------------------------- -- line 58 ---------------------------------------- . "use a wildcard binding", . "_", . Applicability::MaybeIncorrect, // snippet . ); . }, . ); . } . } else { 2 ( 0.00%) if let ExprKind::Match(_, _, MatchSource::AwaitDesugar) = init.kind { . return; . } . 9 ( 0.00%) span_lint_and_then( 457,207 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then:: (1x) . cx, . LET_UNIT_VALUE, . local.span, . "this let-binding has unit value", 5 ( 0.00%) |diag| { . let mut suggestions = Vec::new(); 3 ( 0.00%) let init_new_span = walk_span_to_context(init.span, local.span.ctxt()).unwrap(); 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) . . // Suggest omitting the `let` binding . let app = Applicability::MachineApplicable; . . // If this is a binding pattern, we need to add suggestions to remove any usages . // of the variable 3 ( 0.00%) if let PatKind::Binding(_, binding_hir_id, ..) = local.pat.kind 1 ( 0.00%) && let Some(body_id) = cx.enclosing_body.as_ref() . { 3 ( 0.00%) let body = cx.tcx.hir_body(*body_id); 62 ( 0.00%) => ???:::hir_body (1x) 1 ( 0.00%) let mut visitor = UnitVariableCollector::new(cx, format_args, binding_hir_id); . walk_body(&mut visitor, body); . 1 ( 0.00%) let mut has_in_format_capture = false; 5 ( 0.00%) suggestions.extend(visitor.spans.into_iter().filter_map(|span| match span { . VariableUsage::FormatCapture => { . has_in_format_capture = true; . None . }, 3 ( 0.00%) VariableUsage::Normal(span) => Some((span, "()".to_string())), . VariableUsage::FieldShorthand(span) => Some((span.shrink_to_hi(), ": ()".to_string())), . })); . 2 ( 0.00%) if has_in_format_capture { . // In a case like this: . // ``` . // let unit = returns_unit(); . // eprintln!("{unit}"); . // ``` . // we can't remove the `unit` binding and replace its uses with a `()`, . // because the `eprintln!` would break. . // -- line 109 ---------------------------------------- -- line 120 ---------------------------------------- . )); . diag.multipart_suggestion("replace variable usages with `()`", suggestions, app); . return; . } . } . . // let local = returns_unit(); . // ^^^^^^^^^^^^ remove this 4 ( 0.00%) suggestions.push((local.span.until(init_new_span), String::new())); 192 ( 0.00%) => ???:::until (1x) 7 ( 0.00%) let message = if suggestions.len() == 1 { . "omit the `let` binding" . } else { . "omit the `let` binding and replace variable usages with `()`" . }; 5 ( 0.00%) diag.multipart_suggestion(message, suggestions, app); . }, . ); . } . } . } . . struct UnitVariableCollector<'a, 'tcx> { . cx: &'a LateContext<'tcx>, -- line 142 ---------------------------------------- -- line 165 ---------------------------------------- . /// let unit = (); . /// Foo { unit }; . /// ``` . FieldShorthand(Span), . } . . impl<'a, 'tcx> UnitVariableCollector<'a, 'tcx> { . fn new(cx: &'a LateContext<'tcx>, format_args: &'a FormatArgsStorage, id: HirId) -> Self { 8 ( 0.00%) Self { . cx, . format_args, . id, . spans: Vec::new(), . macro_call: None, . } . } . } . . /** . * Collect all instances where a variable is used based on its `HirId`. . */ . impl<'tcx> Visitor<'tcx> for UnitVariableCollector<'_, 'tcx> { 216 ( 0.00%) fn visit_expr(&mut self, ex: &'tcx Expr<'tcx>) -> Self::Result { 24 ( 0.00%) if let Some(macro_call) = root_macro_call_first_node(self.cx, ex) . && is_format_macro(self.cx, macro_call.def_id) . && let Some(format_args) = self.format_args.get(self.cx, ex, macro_call.expn) . { . let parent_macro_call = self.macro_call; . self.macro_call = Some(format_args); . walk_expr(self, ex); . self.macro_call = parent_macro_call; . return; . } . 95 ( 0.00%) if let ExprKind::Path(QPath::Resolved(None, path)) = ex.kind 36 ( 0.00%) && let Res::Local(id) = path.res 9 ( 0.00%) && id == self.id . { 3 ( 0.00%) if let Some(macro_call) = self.macro_call . && macro_call.arguments.all_args().iter().any(|arg| { . matches!(arg.kind, FormatArgumentKind::Captured(_)) && find_format_arg_expr(ex, arg).is_some() . }) . { . self.spans.push(VariableUsage::FormatCapture); . } else { 6 ( 0.00%) let parent = self.cx.tcx.parent_hir_node(ex.hir_id); 108 ( 0.00%) => ???:::parent_hir_node (1x) 2 ( 0.00%) match parent { . Node::ExprField(expr_field) if expr_field.is_shorthand => { . self.spans.push(VariableUsage::FieldShorthand(ex.span)); . }, . _ => { 1 ( 0.00%) self.spans.push(VariableUsage::Normal(path.span)); . }, . } . } . } . 72 ( 0.00%) walk_expr(self, ex); 3,035 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr:: (1x) 192 ( 0.00%) } . } . . /// Checks sub-expressions which create the value returned by the given expression for whether . /// return value inference is needed. This checks through locals to see if they also need inference . /// at this point. . /// . /// e.g. . /// ```rust,ignore -- line 231 ---------------------------------------- 1,523 ( 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)` 124,921 ( 0.00%) if let ExprKind::Assign(left, right, _) = expr.kind . && let Some(local_id) = left.res_local_id() 1,265 ( 0.00%) && let Some(size_expr) = Self::as_vec_initializer(cx, right) 9,224 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/slow_vector_initialization.rs:::as_vec_initializer (253x) . { . let vi = VecAllocation { . local_id, . allocation_expr: right, . size_expr, . }; . . Self::search_initialization(cx, vi, expr.hir_id); . } . } . . fn check_stmt(&mut self, cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { . // Matches statements which initializes vectors. For example: `let mut vec = Vec::with_capacity(10)` . // or `Vec::new()` 13,527 ( 0.00%) if let StmtKind::Let(local) = stmt.kind 14,092 ( 0.00%) && let PatKind::Binding(BindingMode::MUT, local_id, _, None) = local.pat.kind 849 ( 0.00%) && let Some(init) = local.init 1,400 ( 0.00%) && let Some(size_expr) = Self::as_vec_initializer(cx, init) 31,413 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/slow_vector_initialization.rs:::as_vec_initializer (280x) . { 63 ( 0.00%) let vi = VecAllocation { . local_id, . allocation_expr: init, . size_expr, . }; . 105 ( 0.00%) Self::search_initialization(cx, vi, stmt.hir_id); 130,048 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/slow_vector_initialization.rs:::search_initialization (21x) . } . } . } . . impl SlowVectorInit { . /// Looks for `Vec::with_capacity(size)` or `Vec::new()` calls and returns the initialized size, . /// if any. More specifically, it returns: . /// - `Some(InitializedSize::Initialized(size))` for `Vec::with_capacity(size)` . /// - `Some(InitializedSize::Uninitialized)` for `Vec::new()` . /// - `None` for other, unrelated kinds of expressions 2,665 ( 0.00%) fn as_vec_initializer<'tcx>(cx: &LateContext<'_>, expr: &'tcx Expr<'tcx>) -> Option> { . // Generally don't warn if the vec initializer comes from an expansion, except for the vec! macro. . // This lets us still warn on `vec![]`, while ignoring other kinds of macros that may output an . // empty vec 1,240 ( 0.00%) if expr.span.from_expansion() && matching_root_macro_call(cx, expr.span, sym::vec_macro).is_none() { 11,281 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::matching_root_macro_call (29x) . return None; . } . 6,319 ( 0.00%) if let ExprKind::Call(func, [len_expr]) = expr.kind 28 ( 0.00%) && func.ty_rel_def(cx).is_diag_item(cx, sym::vec_with_capacity) . { . Some(InitializedSize::Initialized(len_expr)) 574 ( 0.00%) } else if let ExprKind::Call(func, []) = expr.kind 102 ( 0.00%) && func.ty_rel_def(cx).is_diag_item(cx, sym::vec_new) . { . Some(InitializedSize::Uninitialized) . } else { . None . } 2,665 ( 0.00%) } . . /// Search initialization for the given vector 189 ( 0.00%) fn search_initialization<'tcx>(cx: &LateContext<'tcx>, vec_alloc: VecAllocation<'tcx>, parent_node: HirId) { 63 ( 0.00%) let enclosing_body = get_enclosing_block(cx, parent_node); 5,481 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_enclosing_block (21x) . 21 ( 0.00%) if enclosing_body.is_none() { . return; . } . 147 ( 0.00%) let mut v = VectorInitializationVisitor { . cx, . vec_alloc, . slow_expression: None, . initialization_found: false, . }; . . v.visit_block(enclosing_body.unwrap()); . 42 ( 0.00%) if let Some(ref allocation_expr) = v.slow_expression { . Self::lint_initialization(cx, allocation_expr, &v.vec_alloc); . } 168 ( 0.00%) } . . fn lint_initialization<'tcx>( . cx: &LateContext<'tcx>, . initialization: &InitializationType<'tcx>, . vec_alloc: &VecAllocation<'_>, . ) { . match initialization { . InitializationType::Extend(e) | InitializationType::Resize(e) => { -- line 191 ---------------------------------------- -- line 240 ---------------------------------------- . . /// `true` if the initialization of the vector has been found on the visited block. . initialization_found: bool, . } . . impl<'tcx> VectorInitializationVisitor<'_, 'tcx> { . /// Checks if the given expression is extending a vector with `repeat(0).take(..)` . fn search_slow_extend_filling(&mut self, expr: &'tcx Expr<'_>) { 25 ( 0.00%) if self.initialization_found 2 ( 0.00%) && let ExprKind::MethodCall(path, self_arg, [extend_arg], _) = expr.kind 2 ( 0.00%) && self_arg.res_local_id() == Some(self.vec_alloc.local_id) . && path.ident.name == sym::extend . && self.is_repeat_take(extend_arg) . { . self.slow_expression = Some(InitializationType::Extend(expr)); . } . } . . /// Checks if the given expression is resizing a vector with 0 . fn search_slow_resize_filling(&mut self, expr: &'tcx Expr<'tcx>) { 76 ( 0.00%) if self.initialization_found 1 ( 0.00%) && let ExprKind::MethodCall(path, self_arg, [len_arg, fill_arg], _) = expr.kind 1 ( 0.00%) && self_arg.res_local_id() == Some(self.vec_alloc.local_id) 1 ( 0.00%) && path.ident.name == sym::resize . // Check that is filled with 0 . && is_integer_literal(fill_arg, 0) . { . let is_matching_resize = if let InitializedSize::Initialized(size_expr) = self.vec_alloc.size_expr { . // If we have a size expression, check that it is equal to what's passed to `resize` . SpanlessEq::new(self.cx).eq_expr(SyntaxContext::root(), len_arg, size_expr) . || matches!(len_arg.kind, ExprKind::MethodCall(path, ..) if path.ident.name == sym::capacity) . } else { -- line 271 ---------------------------------------- -- line 308 ---------------------------------------- . true . } else { . false . } . } . } . . impl<'tcx> Visitor<'tcx> for VectorInitializationVisitor<'_, 'tcx> { 2,728 ( 0.00%) fn visit_stmt(&mut self, stmt: &'tcx Stmt<'_>) { 682 ( 0.00%) if self.initialization_found { 42 ( 0.00%) match stmt.kind { 17 ( 0.00%) StmtKind::Expr(expr) | StmtKind::Semi(expr) => { . self.search_slow_extend_filling(expr); . self.search_slow_resize_filling(expr); . }, . _ => (), . } . 21 ( 0.00%) self.initialization_found = false; . } else { . walk_stmt(self, stmt); . } 960 ( 0.00%) } . . fn visit_block(&mut self, block: &'tcx Block<'_>) { 302 ( 0.00%) if self.initialization_found { . if let Some(s) = block.stmts.first() { . self.visit_stmt(s); . } . . self.initialization_found = false; . } else { . walk_block(self, block); . } . } . . fn visit_expr(&mut self, expr: &'tcx Expr<'_>) { . // Skip all the expressions previous to the vector initialization 4,425 ( 0.00%) if self.vec_alloc.allocation_expr.hir_id == expr.hir_id { 21 ( 0.00%) self.initialization_found = true; . } . 5,303 ( 0.00%) walk_expr(self, expr); 100,350 ( 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 (210x) . } . } 1,835 ( 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 { 372,876 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { . // check for instances of 0.0/0.0 124,292 ( 0.00%) if let ExprKind::Binary(ref op, left, right) = expr.kind 1,690 ( 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. 22 ( 0.00%) && let ecx = ConstEvalCtxt::new(cx) 1,232 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (22x) 22 ( 0.00%) && let ctxt = expr.span.ctxt() 110 ( 0.00%) && let Some(lhs_value) = ecx.eval_local(left, ctxt) 3,404 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval_local (22x) . && let Some(rhs_value) = ecx.eval_local(right, ctxt) . // FIXME(f16_f128): add these types when eq is available on all platforms . && (Constant::F32(0.0) == lhs_value || Constant::F64(0.0) == lhs_value) . && (Constant::F32(0.0) == rhs_value || Constant::F64(0.0) == rhs_value) . { . // since we're about to suggest a use of f32::NAN or f64::NAN, . // match the precision of the literals that are given. . let float_type = match (lhs_value, rhs_value) { -- line 49 ---------------------------------------- -- 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"), . ); . } 435,022 ( 0.01%) } . } 198 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs -------------------------------------------------------------------------------- Ir -- line 460 ---------------------------------------- . /// assert_eq!(13, unsafe { mem::size_of_val_raw(y) }); . /// ``` . #[inline] . #[must_use] . #[stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")] . #[rustc_const_stable(feature = "layout_for_ptr", since = "CURRENT_RUSTC_VERSION")] . pub const unsafe fn size_of_val_raw(val: *const T) -> usize { . // SAFETY: the caller must provide a valid raw pointer 5 ( 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. 2,544 ( 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). . 721,221 ( 0.02%) let result = crate::intrinsics::read_via_copy(dest); 999,169 ( 0.03%) crate::intrinsics::write_via_move(dest, src); . result . } . } . . /// Disposes of a value. . /// . /// This effectively does nothing for types which implement `Copy`, e.g. . /// integers. Such values are copied and _then_ moved into the function, so the -- line 984 ---------------------------------------- -- line 1406 ---------------------------------------- . /// // ⚠️ This is undefined behavior. Don't do this. ⚠️ . /// // assert_eq!(0, unsafe { std::mem::transmute::<_, u8>(std::mem::discriminant(&unit_like)) }); . /// ``` . #[stable(feature = "discriminant_value", since = "1.21.0")] . #[rustc_const_stable(feature = "const_discriminant", since = "1.75.0")] . #[rustc_diagnostic_item = "mem_discriminant"] . #[cfg_attr(miri, track_caller)] // even without panics, this helps for Miri backtraces . pub const fn discriminant(v: &T) -> Discriminant { 19,903 ( 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 ---------------------------------------- 73,076 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/string_patterns.rs -------------------------------------------------------------------------------- Ir -- line 222 ---------------------------------------- . ); . } . }, . ); . } . } . . impl<'tcx> LateLintPass<'tcx> for StringPatterns { 372,876 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 143,328 ( 0.00%) if !expr.span.from_expansion() 25,044 ( 0.00%) && let ExprKind::MethodCall(method, receiver, args, _) = expr.kind 6,261 ( 0.00%) && let method_name = method.ident.name 129 ( 0.00%) && let Some(&(_, pos)) = PATTERN_METHODS . .iter() . .find(|(array_method_name, _)| *array_method_name == method_name) . && let Some(arg) = args.get(pos) 264 ( 0.00%) && let ty::Ref(_, ty, _) = cx.typeck_results().expr_ty_adjusted(receiver).kind() 5,116 ( 0.00%) => ???:::expr_ty_adjusted (88x) 129 ( 0.00%) && ty.is_str() . { . check_single_char_pattern_lint(cx, arg); . . check_manual_pattern_char_comparison(cx, arg, self.msrv); . } 372,876 ( 0.01%) } . } 86,299 ( 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<'_>) { 12,515 ( 0.00%) self.format_trait_impl = is_format_trait_impl(cx, impl_item); 113,236 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/format_impl.rs:clippy_lints::format_impl::is_format_trait_impl (2,503x) . } . . fn check_impl_item_post(&mut self, cx: &LateContext<'_>, impl_item: &ImplItem<'_>) { . // Assume no nested Impl of Debug and Display within each other 10,012 ( 0.00%) if is_format_trait_impl(cx, impl_item).is_some() { 113,236 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/format_impl.rs:clippy_lints::format_impl::is_format_trait_impl (2,503x) 271 ( 0.00%) self.format_trait_impl = None; . } . } . 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 195,226 ( 0.01%) if let Some(format_trait_impl) = self.format_trait_impl { 52,728 ( 0.00%) let linter = FormatImplExpr { . cx, 8,788 ( 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(); . } 497,168 ( 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) { 11,250 ( 0.00%) if self.format_trait_impl.name == sym::Display 17 ( 0.00%) && 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() ? 17 ( 0.00%) && path.ident.name == sym::to_string . // Is the method a part of the ToString trait? (i.e. not to_string() implemented . // separately) . && self . .cx . .typeck_results() . .type_dependent_def_id(self.expr.hir_id) . .opt_parent(self.cx) . .is_diag_item(self.cx, sym::ToString) -- line 166 ---------------------------------------- -- line 175 ---------------------------------------- . self.expr.span, . "using `self.to_string` in `fmt::Display` implementation will cause infinite recursion", . ); . } . } . . fn check_self_in_format_args(&self) { . // Check each arg in format calls - do we ever use Display on self (directly or via deref)? 1,218 ( 0.00%) if let Some(outer_macro) = root_macro_call_first_node(self.cx, self.expr) . && let macro_def_id = outer_macro.def_id 812 ( 0.00%) && is_format_macro(self.cx, macro_def_id) 23,429 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::is_format_macro (203x) 1,616 ( 0.00%) && let Some(format_args) = self.format_args.get(self.cx, self.expr, outer_macro.expn) 277,581 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:::get (202x) . { . for piece in &format_args.template { 1,257 ( 0.00%) if let FormatArgsPiece::Placeholder(placeholder) = piece 332 ( 0.00%) && let trait_name = match placeholder.format_trait { . FormatTrait::Display => sym::Display, . FormatTrait::Debug => sym::Debug, . FormatTrait::LowerExp => sym::LowerExp, . FormatTrait::UpperExp => sym::UpperExp, . FormatTrait::Octal => sym::Octal, . FormatTrait::Pointer => sym::Pointer, . FormatTrait::Binary => sym::Binary, . FormatTrait::LowerHex => sym::LowerHex, . FormatTrait::UpperHex => sym::UpperHex, . } 412 ( 0.00%) && trait_name == self.format_trait_impl.name 123 ( 0.00%) && let Ok(index) = placeholder.argument.index . && let Some(arg) = format_args.arguments.all_args().get(index) 492 ( 0.00%) && let Some(arg_expr) = find_format_arg_expr(self.expr, arg) 114,398 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:clippy_utils::macros::find_format_arg_expr (123x) . { . self.check_format_arg_self(arg_expr); . } . } . } . } . . fn check_format_arg_self(&self, arg: &Expr<'_>) { . // Handle multiple dereferencing of references e.g. &&self . // Handle dereference of &self -> self that is equivalent (i.e. via *self in fmt() impl) . // Since the argument to fmt is itself a reference: &self 369 ( 0.00%) let reference = peel_ref_operators(self.cx, arg); 2,337 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::peel_ref_operators (123x) . // Is the reference self? 116 ( 0.00%) if reference.res_local_id().map(|x| self.cx.tcx.hir_name(x)) == Some(kw::SelfLower) { 5,067 ( 0.00%) => ???:::hir_name (58x) . let FormatTraitNames { name, .. } = self.format_trait_impl; . span_lint( . self.cx, . RECURSIVE_FORMAT_IMPL, . self.expr.span, . format!("using `self` as `{name}` in `impl {name}` will cause infinite recursion"), . ); . } . } . . fn check_print_in_format_impl(&self) { 1,015 ( 0.00%) if let Some(macro_call) = root_macro_call_first_node(self.cx, self.expr) 812 ( 0.00%) && let Some(name) = self.cx.tcx.get_diagnostic_name(macro_call.def_id) 17,661 ( 0.00%) => ???:::get_diagnostic_name (203x) . { . let replacement = match name { 1,420 ( 0.00%) sym::print_macro | sym::eprint_macro => "write", . sym::println_macro | sym::eprintln_macro => "writeln", . _ => return, . }; . . let name = name.as_str().strip_suffix("_macro").unwrap(); . . span_lint_and_sugg( . self.cx, -- line 242 ---------------------------------------- -- line 250 ---------------------------------------- . format!("{replacement}!(..)") . }, . Applicability::HasPlaceholders, . ); . } . } . } . 5,006 ( 0.00%) fn is_format_trait_impl(cx: &LateContext<'_>, impl_item: &ImplItem<'_>) -> Option { 5,006 ( 0.00%) if impl_item.ident.name == sym::fmt 2,168 ( 0.00%) && let ImplItemKind::Fn(_, body_id) = impl_item.kind 1,084 ( 0.00%) && let Some(Impl { . of_trait: Some(of_trait), . .. 2,710 ( 0.00%) }) = get_parent_as_impl(cx.tcx, impl_item.hir_id()) 87,400 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_as_impl (542x) 1,626 ( 0.00%) && let Some(did) = of_trait.trait_ref.trait_def_id() 7,046 ( 0.00%) => ???:::trait_def_id (542x) 2,710 ( 0.00%) && let Some(name) = cx.tcx.get_diagnostic_name(did) 47,154 ( 0.00%) => ???:::get_diagnostic_name (542x) . && matches!(name, sym::Debug | sym::Display) . { 2,168 ( 0.00%) let body = cx.tcx.hir_body(body_id); 36,664 ( 0.00%) => ???:::hir_body (542x) 542 ( 0.00%) let formatter_name = body . .params . .get(1) 542 ( 0.00%) .and_then(|param| param.pat.simple_ident()) . .map(|ident| ident.name); . . Some(FormatTraitNames { name, formatter_name }) . } else { . None . } 5,006 ( 0.00%) } 26,590 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/indexing_slicing.rs -------------------------------------------------------------------------------- Ir -- line 104 ---------------------------------------- . Self { . allow_indexing_slicing_in_tests: conf.allow_indexing_slicing_in_tests, . suppress_restriction_lint_in_const: conf.suppress_restriction_lint_in_const, . } . } . } . . impl<'tcx> LateLintPass<'tcx> for IndexingSlicing { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 124,292 ( 0.00%) if let ExprKind::Index(array, index, _) = &expr.kind 1,246 ( 0.00%) && (!self.suppress_restriction_lint_in_const || !cx.tcx.hir_is_inside_const_context(expr.hir_id)) 3,115 ( 0.00%) && let expr_ty = cx.typeck_results().expr_ty(array) 24,944 ( 0.00%) => ???:::expr_ty (623x) . && 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) . }) 1,228 ( 0.00%) && !is_from_proc_macro(cx, expr) . { 3,070 ( 0.00%) let note = "the suggestion might not be applicable in constant blocks"; 1,228 ( 0.00%) let ty = cx.typeck_results().expr_ty(array).peel_refs(); 24,584 ( 0.00%) => ???:::expr_ty (614x) 1,228 ( 0.00%) let allowed_in_tests = self.allow_indexing_slicing_in_tests && is_in_test(cx.tcx, expr.hir_id); 4,184 ( 0.00%) if let Some(range) = higher::Range::hir(cx, index) { 127,414 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (614x) . // Ranged indexes, i.e., &x[n..m], &x[n..], &x[..n] and &x[..] 500 ( 0.00%) if let ty::Array(_, s) = ty.kind() { 39 ( 0.00%) let size: u128 = if let Some(size) = s.try_to_target_usize(cx.tcx) { . size.into() . } else { . return; . }; . 104 ( 0.00%) let const_range = to_const_range(cx, range, size); 3,272 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/indexing_slicing.rs:clippy_lints::indexing_slicing::to_const_range (13x) . 26 ( 0.00%) if let (Some(start), _) = const_range 39 ( 0.00%) && start > size . { . span_lint( . cx, . OUT_OF_BOUNDS_INDEXING, . range.start.map_or(expr.span, |start| start.span), . "range is out of bounds", . ); . return; . } . 26 ( 0.00%) if let (_, Some(end)) = const_range 20 ( 0.00%) && end > size . { . span_lint( . cx, . OUT_OF_BOUNDS_INDEXING, . range.end.map_or(expr.span, |end| end.span), . "range is out of bounds", . ); . return; -- line 159 ---------------------------------------- -- line 161 ---------------------------------------- . . if let (Some(_), Some(_)) = const_range { . // early return because both start and end are constants . // and we have proven above that they are in bounds . return; . } . } . 1,281 ( 0.00%) let help_msg = match (range.start, range.end) { 224 ( 0.00%) (None, Some(_)) => "consider using `.get(..n)`or `.get_mut(..n)` instead", 504 ( 0.00%) (Some(_), None) => "consider using `.get(n..)` or .get_mut(n..)` instead", 84 ( 0.00%) (Some(_), Some(_)) => "consider using `.get(n..m)` or `.get_mut(n..m)` instead", . (None, None) => return, // [..] is ok. . }; . 490 ( 0.00%) if allowed_in_tests { . return; . } . 3,185 ( 0.00%) span_lint_and_then(cx, INDEXING_SLICING, expr.span, "slicing may panic", |diag| { 394,564 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::check_expr::{closure#3}> (245x) . 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] 728 ( 0.00%) if let ty::Array(..) = ty.kind() { . // Index is a const block. 90 ( 0.00%) if let ExprKind::ConstBlock(..) = index.kind { . return; . } . // Index is a constant uint. 405 ( 0.00%) if let Some(constant) = ConstEvalCtxt::new(cx).eval(index) { 4,183 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (45x) 2,520 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (45x) . // only `usize` index is legal in rust array index . // leave other type to rustc 80 ( 0.00%) if let Constant::Int(off) = constant . && off <= usize::MAX as u128 80 ( 0.00%) && let ty::Uint(utype) = cx.typeck_results().expr_ty(index).kind() 800 ( 0.00%) => ???:::expr_ty (20x) 20 ( 0.00%) && *utype == ty::UintTy::Usize 40 ( 0.00%) && let ty::Array(_, s) = ty.kind() 80 ( 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; 20 ( 0.00%) } 500 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:core::ptr::drop_glue:: (20x) . } . 688 ( 0.00%) if allowed_in_tests { . return; . } . 4,816 ( 0.00%) span_lint_and_then(cx, INDEXING_SLICING, expr.span, "indexing may panic", |diag| { 559,316 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::check_expr::{closure#4}> (344x) . 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); . } . }); . } . } 497,168 ( 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. 156 ( 0.00%) fn to_const_range(cx: &LateContext<'_>, range: higher::Range<'_>, array_size: u128) -> (Option, Option) { 13 ( 0.00%) let ecx = ConstEvalCtxt::new(cx); 728 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::new (13x) 16 ( 0.00%) let s = range.start.map(|expr| ecx.eval(expr)); 414 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (3x) 24 ( 0.00%) let start = match s { 9 ( 0.00%) Some(Some(Constant::Int(x))) => Some(x), . Some(_) => None, . None => Some(0), . }; . 23 ( 0.00%) let e = range.end.map(|expr| ecx.eval(expr)); 1,208 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/consts.rs:::eval (10x) 56 ( 0.00%) let end = match e { 4 ( 0.00%) Some(Some(Constant::Int(x))) => { 8 ( 0.00%) if range.ty.limits() == RangeLimits::Closed { . Some(x + 1) . } else { . Some(x) . } . }, . Some(_) => None, . None => Some(array_size), . }; . 130 ( 0.00%) (start, end) 104 ( 0.00%) } . . /// Checks if the output Ty of the `get` method on this Ty (if any) matches the Ty returned by the . /// indexing operation (if any). . fn ty_has_applicable_get_function<'tcx>( . cx: &LateContext<'tcx>, . ty: Ty<'tcx>, . array_ty: Ty<'tcx>, . index_expr: &Expr<'_>, . ) -> bool { 440 ( 0.00%) if let ty::Adt(_, _) = array_ty.kind() 576 ( 0.00%) && let Some(get_output_ty) = get_adt_inherent_method(cx, ty, sym::get).map(|m| { 1,311,977 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::get_adt_inherent_method (144x) . cx.tcx . .fn_sig(m.def_id) . .skip_binder() . .output() . .skip_binder() . }) . && let ty::Adt(def, args) = get_output_ty.kind() . && cx.tcx.is_diagnostic_item(sym::Option, def.0.did) -- line 278 ---------------------------------------- 11,910 ( 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; . 70,991 ( 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 { 30,800 ( 0.00%) match value { . AttrKind::Normal(attr) => { 70 ( 0.00%) let path_symbols = attr . .item . .path . .segments . .iter() . .map(|seg| seg.ident.name) . .collect::>(); . Self::Normal(path_symbols) . }, 376 ( 0.00%) AttrKind::Synthetic(synthetic) => match &**synthetic { . SyntheticAttr::CfgTrace(_) => Self::CfgTrace, . SyntheticAttr::CfgAttrTrace(_) => Self::CfgAttrTrace, . }, . AttrKind::DocComment(..) => Self::Doc, . } . } . } . 18,040 ( 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(); 5,412 ( 0.00%) let item_src = source_map.lookup_source_file(item_span.lo()); 250,756 ( 0.01%) => ???:::lookup_source_file (1,804x) . . for attr in attrs { 32,723 ( 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(); 12,376 ( 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 => { 12,376 ( 0.00%) if inner_attr_kind.contains(&kind) { . lint_mixed_attrs(cx, attrs); . return; . } 24,752 ( 0.00%) outer_attr_kind.insert(kind); . }, . } . } 14,432 ( 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 { 24,916 ( 0.00%) let attr_src = source_map.lookup_source_file(attr_span.lo()); 865,831 ( 0.02%) => ???:::lookup_source_file (6,229x) . Arc::ptr_eq(item_src, &attr_src) . } 45,111 ( 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); 101 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_no_std_crate (1x) . } . 248,584 ( 0.01%) fn check_expr_post(&mut self, cx: &LateContext<'_>, expr: &Expr<'_>) { 124,292 ( 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", . ); . } 310,730 ( 0.01%) } . } -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/functions/mod.rs -------------------------------------------------------------------------------- Ir -- line 493 ---------------------------------------- . RESULT_LARGE_ERR, . RESULT_UNIT_ERR, . TOO_MANY_ARGUMENTS, . TOO_MANY_LINES, . ]); . . impl EarlyLintPass for EarlyFunctions { . fn check_fn(&mut self, cx: &EarlyContext<'_>, fn_kind: visit::FnKind<'_>, _: Span, _: ast::NodeId) { 8,637 ( 0.00%) duplicate_underscore_argument::check(cx, fn_kind); 2,931,863 ( 0.08%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/duplicate_underscore_argument.rs:clippy_lints::functions::duplicate_underscore_argument::check (2,879x) . } . } . . 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 { 33,852 ( 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, . ) { 2,821 ( 0.00%) let hir_id = cx.tcx.local_def_id_to_hir_id(def_id); 28,210 ( 0.00%) too_many_arguments::check_fn(cx, kind, decl, hir_id, def_id, self.too_many_arguments_threshold); 11,284 ( 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); 36,673 ( 0.00%) misnamed_getters::check_fn(cx, kind, decl, body, span); 179,962 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/misnamed_getters.rs:clippy_lints::functions::misnamed_getters::check_fn (2,821x) 128 ( 0.00%) impl_trait_in_params::check_fn(cx, &kind, body, hir_id); 36,673 ( 0.00%) ref_option::check_fn( 1,446,948 ( 0.04%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/ref_option.rs:clippy_lints::functions::ref_option::check_fn (2,821x) . cx, . kind, . decl, . span, . hir_id, . def_id, . body, 5,642 ( 0.00%) self.avoid_breaking_exported_api, . ); 19,747 ( 0.00%) } . . fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'_>) { 7,716 ( 0.00%) must_use::check_item(cx, item); 692,326 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_item (2,572x) 7,716 ( 0.00%) result::check_item( 1,866,511 ( 0.05%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_item (2,572x) . cx, . item, 2,572 ( 0.00%) self.large_error_threshold, 2,572 ( 0.00%) &self.large_error_ignored, 2,572 ( 0.00%) self.msrv, . ); . } . 25,030 ( 0.00%) fn check_impl_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::ImplItem<'_>) { 7,509 ( 0.00%) must_use::check_impl_item(cx, item); 19,077,009 ( 0.53%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/must_use.rs:clippy_lints::functions::must_use::check_impl_item (2,503x) 7,509 ( 0.00%) result::check_impl_item( 47,865,953 ( 1.32%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_impl_item (2,503x) . cx, . item, 2,503 ( 0.00%) self.large_error_threshold, 2,503 ( 0.00%) &self.large_error_ignored, 2,503 ( 0.00%) self.msrv, . ); . impl_trait_in_params::check_impl_item(cx, item); 12,515 ( 0.00%) renamed_function_params::check_impl_item(cx, item, &self.trait_ids); 696,978 ( 0.02%) => /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 (2,503x) 20,024 ( 0.00%) } . 700 ( 0.00%) fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::TraitItem<'_>) { 70 ( 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); 210 ( 0.00%) must_use::check_trait_item(cx, item); 43,284 ( 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 (70x) 210 ( 0.00%) result::check_trait_item( 101,486 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_trait_item (70x) . cx, . item, 70 ( 0.00%) self.large_error_threshold, 70 ( 0.00%) &self.large_error_ignored, 70 ( 0.00%) self.msrv, . ); 70 ( 0.00%) impl_trait_in_params::check_trait_item(cx, item, self.avoid_breaking_exported_api); 280 ( 0.00%) ref_option::check_trait_item(cx, item, self.avoid_breaking_exported_api); 47,148 ( 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 (70x) 560 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx hir::Expr<'tcx>) { 310,730 ( 0.01%) result::check_expr(cx, expr, self.large_error_threshold, &self.large_error_ignored); 3,569,588 ( 0.10%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/functions/result.rs:clippy_lints::functions::result::check_expr (62,146x) . } . } 39,750 ( 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 { 497,168 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 262,680 ( 0.01%) let (id, span) = match &expr.kind { 213,698 ( 0.01%) ExprKind::Path(path) if let Res::Def(_, id) = cx.qpath_res(path, expr.hir_id) => (id, expr.span), 671,229 ( 0.02%) => ???:::qpath_res (24,025x) . 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. 16,408 ( 0.00%) if let Some(parent_ty) = cx.typeck_results().expr_ty_adjusted_opt(e) 201,694 ( 0.01%) => ???:::expr_ty_adjusted_opt (4,102x) 20,510 ( 0.00%) && let Some(field_def_id) = get_field_def_id_by_name(parent_ty, ident.name) 129,363 ( 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 (4,102x) . { 3,870 ( 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), . ); . } 372,876 ( 0.01%) } . 102,936 ( 0.00%) fn check_pat(&mut self, cx: &LateContext<'tcx>, pat: &'tcx Pat<'_>) { 33,626 ( 0.00%) let PatKind::Struct(struct_path, pat_fields, _) = pat.kind else { . return; . }; 33,466 ( 0.00%) match cx.typeck_results().qpath_res(&struct_path, pat.hir_id) { 29,595 ( 0.00%) => ???:::qpath_res (1,973x) 50 ( 0.00%) Res::Def(DefKind::Struct, struct_def_id) => { 25 ( 0.00%) 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 { . Some(adt_field.did) . } else { . None . } . }) && let Some(&(path, disallowed_path)) = self.disallowed.get(&def_id) -- line 122 ---------------------------------------- -- line 126 ---------------------------------------- . DISALLOWED_FIELDS, . field.span, . format!("use of a disallowed field `{path}`"), . disallowed_path.diag_amendment(field.span), . ); . } . } . }, 3,896 ( 0.00%) Res::Def(DefKind::Variant, variant_def_id) => { 5,844 ( 0.00%) let enum_def_id = cx.tcx.parent(variant_def_id); 7,792 ( 0.00%) let variant = cx.tcx.adt_def(enum_def_id).variant_with_id(variant_def_id); 32,801 ( 0.00%) => ???:::variant_with_id (1,948x) . . for field in pat_fields { . if let Some(def_id) = variant.fields.iter().find_map(|adt_field| { . if field.ident.name == adt_field.name { . Some(adt_field.did) . } else { . None . } -- line 144 ---------------------------------------- -- line 151 ---------------------------------------- . format!("use of a disallowed field `{path}`"), . disallowed_path.diag_amendment(field.span), . ); . } . } . }, . _ => {}, . } 102,936 ( 0.00%) } . } 7,954 ( 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)> { 98,896 ( 0.00%) if let ExprKind::MethodCall(MethodCall { . seg: name_ident, . receiver, . .. . }) = &expr.kind 6,592 ( 0.00%) && let method_name = name_ident.ident.name 39,552 ( 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 { 346,136 ( 0.01%) fn check_expr(&mut self, cx: &EarlyContext<'_>, expr: &Expr) { 6,592 ( 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, . ); . } 395,584 ( 0.01%) } . } 6,592 ( 0.00%) -------------------------------------------------------------------------------- -- 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 { 20,576 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &Item<'tcx>) { 5,256 ( 0.00%) if let ItemKind::Enum(ident, _, ref def) = item.kind 112 ( 0.00%) && let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() 56 ( 0.00%) && let ty::Adt(adt, subst) = ty.kind() 84 ( 0.00%) && adt.variants().len() > 1 156 ( 0.00%) && !item.span.in_external_macro(cx.tcx.sess.source_map()) . { 156 ( 0.00%) let variants_size = AdtVariantInfo::new(cx, *adt, subst); 2,196,414 ( 0.06%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:::new (26x) . 78 ( 0.00%) let mut difference = variants_size[0].size - variants_size[1].size; 52 ( 0.00%) if difference > self.maximum_size_difference_allowed { 3 ( 0.00%) let help_text = "consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum"; 9 ( 0.00%) span_lint_and_then( 656,828 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/diagnostics.rs:clippy_utils::diagnostics::span_lint_and_then::::check_item::{closure#0}> (1x) . cx, . LARGE_ENUM_VARIANT, . item.span, . "large size difference between variants", 15 ( 0.00%) |diag| { . diag.span_label( 2 ( 0.00%) item.span, 8 ( 0.00%) format!("the entire enum is at least {} bytes", approx_ty_size(cx, ty)), 66,853 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::approx_ty_size (1x) . ); . diag.span_label( 6 ( 0.00%) def.variants[variants_size[0].ind].span, 4 ( 0.00%) format!("the largest variant contains at least {} bytes", variants_size[0].size), . ); . diag.span_label( 6 ( 0.00%) def.variants[variants_size[1].ind].span, 1 ( 0.00%) if variants_size[1].fields_size.is_empty() { . "the second-largest variant carries no data at all".to_owned() . } else { 4 ( 0.00%) format!( . "the second-largest variant contains at least {} bytes", . variants_size[1].size . ) . }, . ); . 7 ( 0.00%) let fields = def.variants[variants_size[0].ind].data.fields(); 2 ( 0.00%) let mut applicability = Applicability::MaybeIncorrect; 7 ( 0.00%) if is_copy(cx, ty) || maybe_copy(cx, ty) { 7,516 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/ty/mod.rs:clippy_utils::ty::is_copy (1x) . diag.span_note( . ident.span, . "boxing a variant would require the type no longer be `Copy`", . ); 4 ( 0.00%) } else if !is_no_std_crate(cx) { 101 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_no_std_crate (1x) . let sugg: Vec<(Span, String)> = variants_size[0] . .fields_size . .iter() . .rev() . .map_while(|&(ind, size)| { . if difference > self.maximum_size_difference_allowed { . difference = difference.saturating_sub(size); . Some(( -- line 129 ---------------------------------------- -- line 145 ---------------------------------------- . }) . .collect(); . . if !sugg.is_empty() { . diag.multipart_suggestion(help_text, sugg, Applicability::MaybeIncorrect); . return; . } . } 8 ( 0.00%) diag.span_help(def.variants[variants_size[0].ind].span, help_text); . }, . ); . } . } 20,576 ( 0.00%) } . } . . fn maybe_copy<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool { 2 ( 0.00%) if let ty::Adt(_def, args) = ty.kind() 1 ( 0.00%) && 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(); . } . false . } 58 ( 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")] 11,479 ( 0.00%) fn join(&mut self, sep: &str) -> String . where . Self::Item: std::fmt::Display, . { 1,788 ( 0.00%) match self.next() { . None => String::new(), 2,001 ( 0.00%) Some(first_elt) => { . // estimate lower bound of capacity needed . let (lower, _) = self.size_hint(); 1,105 ( 0.00%) let mut result = String::with_capacity(sep.len() * lower); 3,315 ( 0.00%) write!(&mut result, "{first_elt}").unwrap(); . self.for_each(|elt| { . result.push_str(sep); 4,084 ( 0.00%) write!(&mut result, "{elt}").unwrap(); . }); 5,525 ( 0.00%) result . } . } 13,608 ( 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)); . /// ``` 99 ( 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), . }, 54 ( 0.00%) None => Err(ExactlyOneError::new(None, self)), . } 81 ( 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 ---------------------------------------- -- line 4941 ---------------------------------------- . /// assert!((0..10).filter(|&x| x > 1 && x < 4).at_most_one().unwrap_err().eq(2..4)); . /// assert!((0..10).filter(|&x| x > 1 && x < 5).at_most_one().unwrap_err().eq(2..5)); . /// assert_eq!((0..10).filter(|&_| false).at_most_one().unwrap(), None); . /// ``` . fn at_most_one(mut self) -> Result, ExactlyOneError> . where . Self: Sized, . { 304 ( 0.00%) match self.next() { 9,177 ( 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:, arrayvec::arrayvec::ArrayVec<(&rustc_ast::format::FormatArgPosition, clippy_utils::macros::FormatParamUsage), 3>, ::format_arg_positions::{closure#0}>, ::is_aliased::{closure#0}> as core::iter::traits::iterator::Iterator>::next (76x) 304 ( 0.00%) Some(first) => match self.next() { 5,249 ( 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:, arrayvec::arrayvec::ArrayVec<(&rustc_ast::format::FormatArgPosition, clippy_utils::macros::FormatParamUsage), 3>, ::format_arg_positions::{closure#0}>, ::is_aliased::{closure#0}> as core::iter::traits::iterator::Iterator>::next (76x) . Some(second) => Err(ExactlyOneError::new( . Some(Either::Left([first, second])), . self, . )), . None => Ok(Some(first)), . }, . None => Ok(None), . } -- line 4958 ---------------------------------------- 4,678 ( 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 142 ---------------------------------------- . } . . /// 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>, . { 540 ( 0.00%) if let SearchStep::Match(start, end) = self.into_searcher(haystack).next_back() { . debug_assert_eq!( . end, . haystack.len(), . "The first search step from ReverseSearcher \ . must include the last character" . ); . // SAFETY: `Searcher` is known to return valid indices. . unsafe { Some(haystack.get_unchecked(..start)) } -- line 158 ---------------------------------------- -- 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 { 84 ( 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)> { 6,184 ( 0.00%) loop { 1,339 ( 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 { 32,682 ( 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(); 1,238 ( 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` 6,238 ( 0.00%) let last_byte = unsafe { *self.utf8_encoded.get_unchecked(self.utf8_size() - 1) }; 51,431 ( 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. 38,468 ( 0.00%) self.finger += index + 1; 89,903 ( 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) { 35,141 ( 0.00%) if slice == &self.utf8_encoded[0..self.utf8_size()] { . return Some((found_char, self.finger)); . } . } . } . } else { . // found nothing, exit 562 ( 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) }; 7,584 ( 0.00%) if let Some(index) = memchr::memrchr(last_byte, bytes) { 58,643 ( 0.00%) => ???:core::slice::memchr::memrchr (1,264x) . // we searched a slice that was offset by self.finger, . // add self.finger to recoup the original index 76 ( 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; 304 ( 0.00%) if index >= shift { . let found_char = index - shift; 228 ( 0.00%) if let Some(slice) = haystack.get(found_char..(found_char + self.utf8_size())) { 76 ( 0.00%) if slice == &self.utf8_encoded[0..self.utf8_size()] { . // move finger to before the character found (i.e., at its start index) 76 ( 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 { 1,188 ( 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) . } 280 ( 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; 12,672 ( 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> { 247,086 ( 0.01%) StrSearcher::new(haystack, self) 6,229,432 ( 0.17%) => ???:::new (35,103x) . } . . /// Checks whether the pattern matches at the front of the haystack. . #[inline] . fn is_prefix_of(self, haystack: &str) -> bool { 9 ( 0.00%) haystack.as_bytes().starts_with(self.as_bytes()) . } . . /// Checks whether the pattern matches anywhere in the haystack . #[inline] 9,200 ( 0.00%) fn is_contained_in(self, haystack: &str) -> bool { . if self.len() == 0 { . return true; . } . 1,872 ( 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, . } 7,360 ( 0.00%) } . . /// Removes the pattern from the front of haystack, if it matches. . #[inline] . fn strip_prefix_of(self, haystack: &str) -> Option<&str> { 29,264 ( 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>, . { 17,537 ( 0.00%) if self.is_suffix_of(haystack) { 586 ( 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] 247,978 ( 0.01%) fn next_match(&mut self) -> Option<(usize, usize)> { 70,862 ( 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) => { 70,863 ( 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. 35,432 ( 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, . ) . } . } . } 283,328 ( 0.01%) } . } . . 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 { 1,172,715 ( 0.03%) (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; 35,431 ( 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. 482,537 ( 0.01%) let tail_byte = match haystack.get(self.position + needle_last) { . Some(&b) => b, . None => { 31,762 ( 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 748,563 ( 0.02%) if !self.byteset_contains(tail_byte) { 597,137 ( 0.02%) 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. 136,302 ( 0.00%) if needle[i] != unsafe { *haystack.get_unchecked(self.position + i) } { 17,661 ( 0.00%) self.position += i - self.crit_pos + 1; 48,562 ( 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. 3,225 ( 0.00%) if needle[i] != unsafe { *haystack.get_unchecked(self.position + i) } { 386 ( 0.00%) self.position += self.period; 14,418 ( 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 7,340 ( 0.00%) self.position += needle.len(); . if !long_period { 3,395 ( 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 { 14,350 ( 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}; . 920 ( 0.00%) let first_probe = needle[0]; 920 ( 0.00%) let last_byte_offset = needle.len() - 1; . . // the offset used for the 2nd vector 1,840 ( 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) = 2,760 ( 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 2,760 ( 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..]; . . // this #[cold] is load-bearing, benchmark before removing it... . let check_mask = #[cold] 4,570 ( 0.00%) |idx, mask: u16, skip: bool| -> bool { 58 ( 0.00%) if skip { . return false; . } . . // and so is this. optimizations are weird. . let mut mask = mask; . 52 ( 0.00%) while mask != 0 { . let trailing = mask.trailing_zeros(); . let offset = idx + trailing as usize + 1; . // SAFETY: mask is between 0 and 15 trailing zeroes, we skip one additional byte that was already compared . // and then take trimmed_needle.len() bytes. This is within the bounds defined by the outer loop . unsafe { . let sub = haystack.get_unchecked(offset..).get_unchecked(..trimmed_needle.len()); . if small_slice_eq(sub, trimmed_needle) { . return true; . } . } 52 ( 0.00%) mask &= !(1 << trailing); . } . false 29 ( 0.00%) }; . . let test_chunk = |idx| -> u16 { . // SAFETY: this requires at least LANES bytes being readable at idx . // that is ensured by the loop ranges (see comments below) . let a: Block = unsafe { haystack.as_ptr().add(idx).cast::().read_unaligned() }; . // SAFETY: this requires LANES + block_offset bytes being readable at idx . let b: Block = unsafe { . haystack.as_ptr().add(idx).add(second_probe_offset).cast::().read_unaligned() -- line 1889 ---------------------------------------- -- line 1896 ---------------------------------------- . mask . }; . . let mut i = 0; . let mut result = false; . // The loop condition must ensure that there's enough headroom to read LANE bytes, . // and not only at the current index but also at the index shifted by block_offset . const UNROLL: usize = 4; 51,591 ( 0.00%) while i + last_byte_offset + UNROLL * Block::LEN < haystack.len() && !result { . let mut masks = [0u16; UNROLL]; . for j in 0..UNROLL { 8,444 ( 0.00%) masks[j] = test_chunk(i + j * Block::LEN); . } . for j in 0..UNROLL { . let mask = masks[j]; 71,206 ( 0.00%) if mask != 0 { 272 ( 0.00%) result |= check_mask(i + j * Block::LEN, mask, result); 593 ( 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:core::str::pattern::simd_contains::{closure#2} (26x) . } . } 8,444 ( 0.00%) i += UNROLL * Block::LEN; . } 10,667 ( 0.00%) while i + last_byte_offset + Block::LEN < haystack.len() && !result { . let mask = test_chunk(i); 4,920 ( 0.00%) if mask != 0 { 4 ( 0.00%) result |= check_mask(i, mask, result); 22 ( 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:core::str::pattern::simd_contains::{closure#2} (1x) . } . i += Block::LEN; . } . . // Process the tail that didn't fit into LANES-sized steps. . // This simply repeats the same procedure but as right-aligned chunk instead . // of a left-aligned one. The last byte must be exactly flush with the string end so . // we don't miss a single byte or read out of bounds. 914 ( 0.00%) let i = haystack.len() - last_byte_offset - Block::LEN; . let mask = test_chunk(i); 1,828 ( 0.00%) if mask != 0 { 16 ( 0.00%) result |= check_mask(i, mask, result); 44 ( 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:core::str::pattern::simd_contains::{closure#2} (2x) . } . . Some(result) . } . . /// Compares short slices for equality. . /// . /// It avoids a call to libc's memcmp which is faster on long slices -- line 1940 ---------------------------------------- -- line 1955 ---------------------------------------- . // https://github.com/BurntSushi/memchr/blob/8037d11b4357b0f07be2bb66dc2659d9cf28ad32/src/memmem/util.rs#L32 . . // If we don't have enough bytes to do 4-byte at a time loads, then . // fall back to the naive slow version. . // . // Potential alternative: We could do a copy_nonoverlapping combined with a mask instead . // of a loop. Benchmark it. . if x.len() < 4 { 35 ( 0.00%) for (&b1, &b2) in x.iter().zip(y) { 73 ( 0.00%) if b1 != b2 { . return false; . } . } . return true; . } . // When we have 4 or more bytes to compare, then proceed in chunks of 4 at . // a time using unaligned loads. . // -- line 1972 ---------------------------------------- 1,552,839 ( 0.04%) -------------------------------------------------------------------------------- -- 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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, e: &'tcx Expr<'_>) { 141,251 ( 0.00%) if let ExprKind::Call(path_expr, [arg]) = e.kind 28,856 ( 0.00%) && let ExprKind::Path(QPath::Resolved(None, path)) = path_expr.kind . && let Some(def_id) = path.res.opt_def_id() 24,339 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::transmute, def_id) 333,684 ( 0.01%) => ???:::is_diagnostic_item (3,477x) . { . // 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); . } . } 497,168 ( 0.01%) } . } 6,954 ( 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<'_>) { 280 ( 0.00%) if let TraitItemKind::Fn(sig, trait_method) = &item.kind { . if matches!(trait_method, TraitFn::Provided(_)) { . // Handled by `check_body`. . return; . } . 232 ( 0.00%) mut_from_ref::check(cx, sig, None); 6,501 ( 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 (58x) 232 ( 0.00%) ptr_arg::check_trait_item(cx, item.owner_id, sig); 11,083 ( 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 (58x) . } . } . 26,586 ( 0.00%) fn check_body(&mut self, cx: &LateContext<'tcx>, body: &Body<'tcx>) { 8,862 ( 0.00%) let mut parents = cx.tcx.hir_parent_iter(body.value.hir_id); 7,952 ( 0.00%) let (item_id, sig, is_trait_item) = match parents.next() { . Some((_, Node::Item(i))) => { 448 ( 0.00%) if let ItemKind::Fn { sig, .. } = &i.kind { . (i.owner_id, sig, false) . } else { . return; . } . }, . Some((_, Node::ImplItem(i))) => { 4,874 ( 0.00%) if !matches!(parents.next(), 7,311 ( 0.00%) Some((_, Node::Item(i))) if matches!(&i.kind, ItemKind::Impl(i) if i.of_trait.is_none()) . ) { . return; . } 3,138 ( 0.00%) if let ImplItemKind::Fn(sig, _) = &i.kind { . (i.owner_id, sig, false) . } else { . return; . } . }, . Some((_, Node::TraitItem(i))) => { 24 ( 0.00%) if let TraitItemKind::Fn(sig, _) = &i.kind { . (i.owner_id, sig, true) . } else { . return; . } . }, . _ => return, . }; . 6,696 ( 0.00%) mut_from_ref::check(cx, sig, Some(body)); 656,641 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/mut_from_ref.rs:clippy_lints::ptr::mut_from_ref::check (1,674x) 10,044 ( 0.00%) ptr_arg::check_body(cx, body, item_id, sig, is_trait_item); 906,863 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_arg.rs:clippy_lints::ptr::ptr_arg::check_body (1,674x) 25,306 ( 0.00%) } . . fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 6,760 ( 0.00%) if let ExprKind::Binary(op, l, r) = expr.kind 4,936 ( 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" . )] 3,636 ( 0.00%) if !cmp_null::check(cx, expr, op.node, l, r) { 704,826 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/cmp_null.rs:clippy_lints::ptr::cmp_null::check (404x) 2,424 ( 0.00%) ptr_eq::check(cx, op.node, l, r, expr.span); 69,203 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/ptr/ptr_eq.rs:clippy_lints::ptr::ptr_eq::check (404x) . } . } . } . } 13,104 ( 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 { 5,289 ( 0.00%) if typeck.hir_owner == id.owner { 20,447 ( 0.00%) let def = typeck.type_dependent_def(id); 12,344 ( 0.00%) => ???:::type_dependent_def (224x) . 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)] 11,062 ( 0.00%) fn f(qpath: &QPath<'_>, id: HirId, typeck: &TypeckResults<'_>) -> Res { 23,156 ( 0.00%) match *qpath { 44,838 ( 0.00%) QPath::Resolved(_, p) => p.res, 24,679 ( 0.00%) QPath::TypeRelative(..) if let Some((kind, id)) = typeck.ty_based_def(id) => Res::Def(kind, id), . QPath::TypeRelative(..) => Res::Err, . } 15,404 ( 0.00%) } 70 ( 0.00%) match self.opt_qpath() { 28,441 ( 0.00%) Some((qpath, id)) if let Some(typeck) = typeck.typeck_res() => f(qpath, id, typeck), 1,179 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/res.rs:clippy_utils::res::MaybeQPath::res::f (19x) 123 ( 0.00%) _ => Res::Err, . } . } . . /// If this is a path with the specified name as its final segment gets its . /// resolution. Returns `Res::Err` otherwise. . #[inline] . #[cfg_attr(debug_assertions, track_caller)] . fn res_if_named<'tcx>(self, typeck: &impl MaybeTypeckRes<'tcx>, name: Symbol) -> Res { -- line 124 ---------------------------------------- -- line 243 ---------------------------------------- . } . . /// If this is a type-relative path gets the definition it resolves to. . /// . /// Only inherent associated items require a type-relative path. . #[inline] . #[cfg_attr(debug_assertions, track_caller)] . fn ty_rel_def<'tcx>(self, typeck: &impl MaybeTypeckRes<'tcx>) -> Option { 662 ( 0.00%) match self.opt_qpath() { 258 ( 0.00%) Some((QPath::TypeRelative(..), id)) => typeck.ty_based_def(id), . _ => None, . } . } . . /// If this is a type-relative path to an item with the specified name gets . /// the definition it resolves to. . /// . /// Only inherent associated items require a type-relative path. . #[inline] . #[cfg_attr(debug_assertions, track_caller)] . fn ty_rel_def_if_named<'tcx>(self, typeck: &impl MaybeTypeckRes<'tcx>, name: Symbol) -> Option { 422 ( 0.00%) match self.opt_qpath() { 36 ( 0.00%) Some((&QPath::TypeRelative(_, seg), id)) if seg.ident.name == name => typeck.ty_based_def(id), . _ => None, . } . } . . /// If this is a type-relative path gets the definition it resolves to and . /// its final segment. . /// . /// Only inherent associated items require a type-relative path. -- line 273 ---------------------------------------- -- line 285 ---------------------------------------- . #[inline] . fn opt_qpath(self) -> Option> { . Some((self.0, self.1)) . } . } . impl<'tcx> MaybeQPath<'tcx> for &'tcx Expr<'_> { . #[inline] . fn opt_qpath(self) -> Option> { 68,486 ( 0.00%) match &self.kind { 33,225 ( 0.00%) ExprKind::Path(qpath) => Some((qpath, self.hir_id)), . _ => None, . } . } . } . impl<'tcx> MaybeQPath<'tcx> for &'tcx PatExpr<'_> { . #[inline] . fn opt_qpath(self) -> Option> { 60 ( 0.00%) match &self.kind { 60 ( 0.00%) PatExprKind::Path(qpath) => Some((qpath, self.hir_id)), . PatExprKind::Lit { .. } => None, . } . } . } . impl<'tcx, AmbigArg> MaybeQPath<'tcx> for &'tcx hir::Ty<'_, AmbigArg> { . #[inline] . fn opt_qpath(self) -> Option> { . match &self.kind { -- line 311 ---------------------------------------- -- 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() 237,315 ( 0.01%) && let Res::Local(id) = p.res . { . Some(id) . } else { . None . } . } . . /// If this node is a path to a local gets the local's `HirId` and identifier. -- line 382 ---------------------------------------- -- line 405 ---------------------------------------- . #[inline] . fn basic_res(self) -> &'a Res { . &self.res . } . } . impl<'a> MaybeResPath<'a> for &QPath<'a> { . #[inline] . fn opt_res_path(self) -> OptResPath<'a> { 26,587 ( 0.00%) match *self { 81,069 ( 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> { 923,656 ( 0.03%) match &self.kind { 70,426 ( 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::::expr_usage_requires_vec::{closure#0}, ()>> (42x) 2,136 ( 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::::expr_usage_requires_vec::{closure#0}, ()>>'2 (1x) . 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> { 2,718 ( 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 { 11,780 ( 0.00%) self.opt_def_id().and_then(|id| tcx.tcx().get_diagnostic_name(id)) 11,095 ( 0.00%) => ???:::get_diagnostic_name (133x) . } . . /// 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() 67,108 ( 0.00%) .is_some_and(|id| tcx.tcx().is_diagnostic_item(name, id)) 15,965 ( 0.00%) => ???:::is_diagnostic_item (155x) . } . . /// 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() 2,923 ( 0.00%) .is_some_and(|id| tcx.tcx().lang_items().get(item) == Some(id)) 40 ( 0.00%) => ???:::lang_items (1x) . } . . /// If this definition is an impl block gets its type. . #[inline] 3,558 ( 0.00%) fn opt_impl_ty<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option>> { 2,152 ( 0.00%) match self.opt_def(tcx) { 12,632 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/res.rs:::opt_def:: (78x) 332 ( 0.00%) Some((DefKind::Impl { .. }, id)) => Some(tcx.tcx().type_of(id)), . _ => None, . } 3,787 ( 0.00%) } . . /// Gets the parent of this definition if it has one. . #[inline] 174 ( 0.00%) fn opt_parent<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option { . self.opt_def_id().and_then(|id| tcx.tcx().opt_parent(id)) 348 ( 0.00%) } . . /// Checks if this definition is an impl block. . #[inline] . fn is_impl<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> bool { 288 ( 0.00%) matches!(self.opt_def(tcx), Some((DefKind::Impl { .. }, _))) . } . . /// If this definition is a constructor gets the `DefId` of it's type or variant. . #[inline] . fn ctor_parent<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option { 2,398 ( 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] 426 ( 0.00%) fn assoc_parent<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option { 108 ( 0.00%) match self.opt_def(tcx) { . Some((DefKind::AssocConst { .. } | DefKind::AssocFn | DefKind::AssocTy, id)) => tcx.tcx().opt_parent(id), . _ => None, . } 568 ( 0.00%) } . . /// If this definition is an associated function of an impl or trait gets the . /// `DefId` of its parent. . #[inline] . fn assoc_fn_parent<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option { 178 ( 0.00%) match self.opt_def(tcx) { . Some((DefKind::AssocFn, id)) => tcx.tcx().opt_parent(id), . _ => None, . } . } . } . impl MaybeDef for DefId { . #[inline] . fn opt_def_id(self) -> Option { . Some(self) . } . . #[inline] 3,557 ( 0.00%) fn opt_def<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option<(DefKind, DefId)> { . self.opt_def_id().map(|id| (tcx.tcx().def_kind(id), id)) 2,656 ( 0.00%) } . } . impl MaybeDef for (DefKind, DefId) { . #[inline] . fn opt_def_id(self) -> Option { . Some(self.1) . } . . #[inline] . fn opt_def<'tcx>(self, _: &impl HasTyCtxt<'tcx>) -> Option<(DefKind, DefId)> { 80 ( 0.00%) Some(self) . } . } . impl MaybeDef for AdtDef<'_> { . #[inline] . fn opt_def_id(self) -> Option { . Some(self.did()) . } . -- line 620 ---------------------------------------- -- line 642 ---------------------------------------- . impl MaybeDef for Res { . #[inline] . fn opt_def_id(self) -> Option { . Res::opt_def_id(&self) . } . . #[inline] . fn opt_def<'tcx>(self, _: &impl HasTyCtxt<'tcx>) -> Option<(DefKind, DefId)> { 4,734 ( 0.00%) match self { 1,920 ( 0.00%) Res::Def(kind, id) => Some((kind, id)), . _ => None, . } . } . } . impl MaybeDef for Option { . #[inline] . fn opt_def_id(self) -> Option { . self.and_then(T::opt_def_id) . } . . #[inline] . fn opt_def<'tcx>(self, tcx: &impl HasTyCtxt<'tcx>) -> Option<(DefKind, DefId)> { 506 ( 0.00%) self.and_then(|x| T::opt_def(x, tcx)) 29,791 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/res.rs:::opt_def:: (253x) . } . } . impl MaybeDef for EarlyBinder<'_, T> { . #[inline] . fn opt_def_id(self) -> Option { . self.skip_binder().opt_def_id() . } . -- line 672 ---------------------------------------- 227,414 ( 0.01%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/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 { 59,229 ( 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 116 ---------------------------------------- . . fn fold_binder>>( . &mut self, . 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); 270 ( 0.00%) t . } . 47,744 ( 0.00%) fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx> { 23,872 ( 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()) . } . _ => { 23,872 ( 0.00%) if !t.has_vars_bound_at_or_above(self.current_index) { . t 10,652 ( 0.00%) } else if let Some(&t) = self.cache.get(&(self.current_index, t)) { . t . } else { 15,978 ( 0.00%) let res = t.super_fold_with(self); 3,245,519 ( 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/structural_impls.rs:>::super_fold_with::> (4,702x) . assert!(self.cache.insert((self.current_index, t), res)); . res . } . } . } 47,744 ( 0.00%) } . . fn fold_region(&mut self, r: ty::Region<'tcx>) -> ty::Region<'tcx> { 31,098 ( 0.00%) match r.kind() { . ty::ReBound(ty::BoundVarIndexKind::Bound(debruijn), br) 5,140 ( 0.00%) if debruijn == self.current_index => . { 19,780 ( 0.00%) let region = self.delegate.replace_region(br); 4,600 ( 0.00%) => ???:::replace_region (13x) 30,840 ( 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, . } . } . 12 ( 0.00%) fn fold_const(&mut self, ct: ty::Const<'tcx>) -> ty::Const<'tcx> { 70 ( 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()) . } 38 ( 0.00%) _ => ct.super_fold_with(self), 112 ( 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::> (4x) . } . } . . 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 = 60,193 ( 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); 12,541 ( 0.00%) (value, region_map) . } . 376 ( 0.00%) 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(); 9,210 ( 0.00%) if !value.has_escaping_bound_vars() { 40,522 ( 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); 106 ( 0.00%) value.fold_with(&mut replacer) 58,902 ( 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::> (53x) 149 ( 0.00%) } 329 ( 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, . delegate: impl BoundVarReplacerDelegate<'tcx>, -- line 252 ---------------------------------------- -- line 275 ---------------------------------------- . pub fn liberate_late_bound_regions( . self, . all_outlive_scope: DefId, . value: ty::Binder<'tcx, T>, . ) -> T . where . T: TypeFoldable>, . { 97 ( 0.00%) self.instantiate_bound_regions_uncached(value, |br| { 46,514 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_middle/src/ty/fold.rs:::instantiate_bound_regions_uncached::, ::liberate_late_bound_regions>::{closure#0}> (44x) 160 ( 0.00%) let kind = ty::LateParamRegionKind::from_bound(br.var, br.kind); 320 ( 0.00%) ty::Region::new_late_param(self, all_outlive_scope, kind) 160 ( 0.00%) }) . } . . pub fn shift_bound_var_indices(self, bound_vars: usize, value: T) -> T . where . T: TypeFoldable>, . { . let shift_bv = |bv: ty::BoundVar| bv + bound_vars; . self.replace_escaping_bound_vars_uncached( -- line 294 ---------------------------------------- -- 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. 122,154 ( 0.00%) pub fn instantiate_bound_regions_with_erased(self, value: Binder<'tcx, T>) -> T . where . T: TypeFoldable>, . { 57,170 ( 0.00%) self.instantiate_bound_regions(value, |_| self.lifetimes.re_erased).0 96,228 ( 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 ---------------------------------------- 26,949 ( 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 { 248,584 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 298,306 ( 0.01%) match &expr.kind { 13,184 ( 0.00%) ExprKind::MethodCall(path, func, [param], _) => { 4,372 ( 0.00%) if let Some(adt) = cx.typeck_results().expr_ty(func).peel_refs().ty_adt_def() 87,584 ( 0.00%) => ???:::expr_ty (2,186x) 1,920 ( 0.00%) && matches!( 7,330 ( 0.00%) (cx.tcx.get_diagnostic_name(adt.did()), path.ident.name), 129,449 ( 0.00%) => ???:::get_diagnostic_name (1,920x) 3,140 ( 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); . } . }, 12,424 ( 0.00%) ExprKind::Call(func, [param]) => { 18,140 ( 0.00%) if let ExprKind::Path(ref path) = func.kind 18,140 ( 0.00%) && let Some(def_id) = cx.qpath_res(path, func.hir_id).opt_def_id() 157,518 ( 0.00%) => ???:::qpath_res (4,535x) 22,200 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::permissions_from_mode, def_id) 346,130 ( 0.01%) => ???:::is_diagnostic_item (4,440x) . && 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); . } . }, . _ => {}, . } 310,730 ( 0.01%) } . } . . fn show_error(cx: &LateContext<'_>, param: &Expr<'_>) { . let mut applicability = Applicability::MachineApplicable; . span_lint_and_sugg( . cx, . NON_OCTAL_UNIX_PERMISSIONS, . param.span, -- line 83 ---------------------------------------- 13,605 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/collect.rs -------------------------------------------------------------------------------- Ir -- line 315 ---------------------------------------- . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_unstable(feature = "const_iter", issue = "92476")] . const impl IntoIterator for I { . type Item = I::Item; . type IntoIter = I; . . #[inline] . fn into_iter(self) -> I { 63,957 ( 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 ---------------------------------------- 79 ( 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 310 ( 0.00%) fn check_impl<'a>(&self, cx: &LateContext<'a>, ty: Ty<'a>) -> bool { 215 ( 0.00%) match ty.kind() { 6 ( 0.00%) ty::Adt(adt_def, args) => adt_def . .all_fields() 48 ( 0.00%) .any(|f| self.check_impl(cx, f.ty(cx.tcx, args).skip_norm_wip())), 480 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/large_const_arrays.rs:::check_impl'2 (3x) 207 ( 0.00%) => ???:::ty (3x) . ty::Array(element_type, cst) => { 2 ( 0.00%) let normalized = cx . .tcx 3 ( 0.00%) .try_normalize_erasing_regions(cx.typing_env(), Unnormalized::new_wip(*cst)) 21 ( 0.00%) => ???:::typing_env (1x) . .unwrap_or(*cst); 2 ( 0.00%) if let Some(element_count) = normalized.try_to_target_usize(cx.tcx) 1 ( 0.00%) && let Ok(element_size) = cx.layout_of(*element_type).map(|l| l.size.bytes()) 6 ( 0.00%) && u128::from(self.maximum_allowed_size) < u128::from(element_count) * u128::from(element_size) . { . true . } else { . false . } . }, . ty::Tuple(fields) => fields.iter().any(|f| self.check_impl(cx, f)), . _ => false, . } 248 ( 0.00%) } . } . . impl<'tcx> LateLintPass<'tcx> for LargeConstArrays { 18,004 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) { 5,144 ( 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. 104 ( 0.00%) && generics.params.is_empty() && !generics.has_where_clause_predicates 52 ( 0.00%) && !item.span.from_expansion() 75 ( 0.00%) && let ty = cx.tcx.type_of(item.owner_id).instantiate_identity().skip_norm_wip() 100 ( 0.00%) && self.check_impl(cx, ty) 4,415 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/large_const_arrays.rs:::check_impl (25x) . { . 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, . ); . }, . ); . } 20,576 ( 0.00%) } . } 4 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/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. 94,520 ( 0.00%) if text.len() < 2 * USIZE_BYTES { . return memchr_naive(x, text); . } . 119,819 ( 0.00%) memchr_aligned(x, text) 136 ( 0.00%) => ???:core::slice::memchr::memchr_aligned (2x) . } . . #[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)`. 154,602 ( 0.00%) while i < text.len() { 121,992 ( 0.00%) if text[i] == x { . return Some(i); . } . 51,041 ( 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 ---------------------------------------- 62,722 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/doc/suspicious_doc_comments.rs -------------------------------------------------------------------------------- Ir -- line 4 ---------------------------------------- . use rustc_errors::Applicability; . use rustc_hir::Attribute; . use rustc_hir::attrs::AttributeKind; . use rustc_lint::LateContext; . use rustc_span::Span; . . use super::SUSPICIOUS_DOC_COMMENTS; . 596,267 ( 0.02%) pub fn check(cx: &LateContext<'_>, attrs: &[Attribute]) -> bool { . let replacements: Vec<_> = collect_doc_replacements(attrs); . 170,362 ( 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 . } 681,448 ( 0.02%) } . . fn collect_doc_replacements(attrs: &[Attribute]) -> Vec<(Span, String)> { . attrs . .iter() . .filter_map(|attr| { 165,932 ( 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,156 ( 0.00%) None . } . }) . .collect() . } 26,425 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/collections/btree/search.rs -------------------------------------------------------------------------------- Ir -- line 218 ---------------------------------------- . where . Q: Ord, . K: Borrow, . { . let node = self.reborrow(); . let keys = node.keys(); . debug_assert!(start_index <= keys.len()); . for (offset, k) in unsafe { keys.get_unchecked(start_index..) }.iter().enumerate() { 67,932 ( 0.00%) match key.cmp(k.borrow()) { 91,080 ( 0.00%) => ???:::cmp (990x) . Ordering::Greater => {} . Ordering::Equal => return IndexResult::KV(start_index + offset), . Ordering::Less => return IndexResult::Edge(start_index + offset), . } . } . IndexResult::Edge(keys.len()) . } . -- line 234 ---------------------------------------- 1,896 ( 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 { 6,750 ( 0.00%) let macro_def_id = span.source_callee()?.macro_def_id?; 176,347 ( 0.00%) => ???:::source_callee (2,821x) . Some( 1,662 ( 0.00%) cx.tcx.is_diagnostic_item(sym::thread_local_macro, macro_def_id) 43,475 ( 0.00%) => ???:::is_diagnostic_item (554x) . && matches!(fn_kind, intravisit::FnKind::ItemFn(..)), . ) . } . . fn is_unreachable(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 3 ( 0.00%) if let Some(macro_call) = macro_backtrace(expr.span).next() . && let Some(diag_name) = cx.tcx.get_diagnostic_name(macro_call.def_id) . { . return (matches!( . diag_name, . sym::core_panic_macro . | sym::std_panic_macro . | sym::core_panic_2015_macro . | sym::std_panic_2015_macro -- line 79 ---------------------------------------- -- line 85 ---------------------------------------- . ); . } . false . } . . #[inline] . fn initializer_can_be_made_const(cx: &LateContext<'_>, defid: rustc_span::def_id::DefId, msrv: Msrv) -> bool { . // Building MIR for `fn`s with unsatisfiable clauses results in ICE. 6 ( 0.00%) if !fn_has_unsatisfiable_clauses(cx, defid) 592 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::fn_has_unsatisfiable_clauses (1x) . && let mir = cx.tcx.optimized_mir(defid) 4 ( 0.00%) && let Ok(()) = is_min_const_fn(cx, mir, msrv) 26,865 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/qualify_min_const_fn.rs:clippy_utils::qualify_min_const_fn::is_min_const_fn (1x) . { . return true; . } . false . } . . impl<'tcx> LateLintPass<'tcx> for MissingConstForThreadLocal { 28,210 ( 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(); 5,642 ( 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 1 ( 0.00%) && !cx.tcx.is_const_fn(defid) 4 ( 0.00%) && let ExprKind::Block(block, _) = body.value.kind 3 ( 0.00%) && let Some(unpeeled) = block.expr 1 ( 0.00%) && let ret_expr = peel_blocks(unpeeled) . // A common pattern around threadlocal! is to make the value unreachable . // to force an initialization before usage . // https://github.com/rust-lang/rust-clippy/issues/12637 . // we ensure that this is reachable before we check in mir . && !is_unreachable(cx, ret_expr) 1 ( 0.00%) && initializer_can_be_made_const(cx, defid, self.msrv) . // we know that the function is const-qualifiable, so now . // we need only to get the initializer expression to span-lint it. . && let initializer_snippet = snippet(cx, ret_expr.span, "thread_local! { ... }") . && initializer_snippet != "thread_local! { ... }" . && self.msrv.meets(cx, msrvs::THREAD_LOCAL_CONST_INIT) . { . span_lint_and_sugg( . cx, -- line 138 ---------------------------------------- -- 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, . ); . } 22,568 ( 0.00%) } . } 2,827 ( 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>), . { 607,334 ( 0.02%) ty::tls::with_context_opt(|icx| { 63,108 ( 0.00%) let Some(icx) = icx else { return }; 31,554 ( 0.00%) op(icx.task_deps) 694,096 ( 0.02%) }) . } . . 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/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 { 15,978 ( 0.00%) if self.count >= CACHE_CUTOFF { . self.cold_insert(key, value) . } else { 10,652 ( 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> { 5,326 ( 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 ---------------------------------------- 5,326 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/iter/traits/accum.rs -------------------------------------------------------------------------------- Ir -- line 47 ---------------------------------------- . macro_rules! integer_sum_product { . (@impls $zero:expr, $one:expr, #[$attr:meta], $($a:ty)*) => ($( . #[$attr] . impl Sum for $a { . fn sum>(iter: I) -> Self { . iter.fold( . $zero, . #[rustc_inherit_overflow_checks] 111,870 ( 0.00%) |a, b| a + b, . ) . } . } . . #[$attr] . impl Product for $a { . fn product>(iter: I) -> Self { . iter.fold( -- line 63 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/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 { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, exp: &Expr<'tcx>) { 136,716 ( 0.00%) if let ExprKind::Call(maybe_path, [src, radix]) = &exp.kind 3,190 ( 0.00%) && let ExprKind::Path(QPath::TypeRelative(ty, pathseg)) = &maybe_path.kind . . // check if the second argument is a primitive `10` 4 ( 0.00%) && 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 . . // check if the first part of the path is some integer primitive . && let TyKind::Path(ty_qpath) = &ty.kind . && let ty_res = cx.qpath_res(ty_qpath, ty.hir_id) -- line 59 ---------------------------------------- -- 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, . ); . } 497,168 ( 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() . } 371 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/default.rs -------------------------------------------------------------------------------- Ir -- line 73 ---------------------------------------- . . #[derive(Default)] . pub struct Default { . // Spans linted by `field_reassign_with_default`. . reassigned_linted: FxHashSet, . } . . impl<'tcx> LateLintPass<'tcx> for Default { 435,022 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 186,438 ( 0.01%) if !expr.span.from_expansion() . // Avoid cases already linted by `field_reassign_with_default` 48,624 ( 0.00%) && !self.reassigned_linted.contains(&expr.span) 378 ( 0.00%) && let ExprKind::Call(path, []) = expr.kind 4,158 ( 0.00%) && !in_automatically_derived(cx.tcx, expr.hir_id) 338,720 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::in_automatically_derived (378x) 1,130 ( 0.00%) && let ExprKind::Path(ref qpath) = path.kind 1,870 ( 0.00%) && let Some(def_id) = cx.qpath_res(qpath, path.hir_id).opt_def_id() 22,620 ( 0.00%) => ???:::qpath_res (374x) 1,860 ( 0.00%) && cx.tcx.is_diagnostic_item(sym::default_fn, def_id) 26,831 ( 0.00%) => ???:::is_diagnostic_item (372x) 135 ( 0.00%) && !is_update_syntax_base(cx, expr) 3,445 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/default.rs:clippy_lints::default::is_update_syntax_base (27x) . // Detect and ignore ::default() because these calls do explicitly name the type. 54 ( 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 . ); . } 497,168 ( 0.01%) } . . #[expect(clippy::too_many_lines)] 49,149 ( 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 { 21,844 ( 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 7,186 ( 0.00%) let (local, variant, binding_name, binding_type, span) = if let StmtKind::Let(local) = stmt.kind . // only take `let ...` statements 4,302 ( 0.00%) && let Some(expr) = local.init 9,730 ( 0.00%) && !in_automatically_derived(cx.tcx, expr.hir_id) 1,222,516 ( 0.03%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::in_automatically_derived (1,390x) 2,728 ( 0.00%) && !expr.span.from_expansion() . // only take bindings to identifiers 6,459 ( 0.00%) && let PatKind::Binding(_, binding_id, ident, _) = local.pat.kind . // only when assigning `... = Default::default()` 5,135 ( 0.00%) && is_expr_default(cx, expr) 11,444 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_expr_default (1,027x) 6 ( 0.00%) && let binding_type = cx.typeck_results().node_type(binding_id) 82 ( 0.00%) => ???:::node_type (2x) 6 ( 0.00%) && let ty::Adt(adt, args) = *binding_type.kind() 2 ( 0.00%) && adt.is_struct() 2 ( 0.00%) && let variant = adt.non_enum_variant() 16 ( 0.00%) => ???:::non_enum_variant (2x) . && !variant.field_list_has_applicable_non_exhaustive() 10 ( 0.00%) && let module_did = cx.tcx.parent_module(stmt.hir_id) 360 ( 0.00%) => ???:::parent_module (2x) . && variant . .fields . .iter() 2 ( 0.00%) .all(|field| field.vis.is_accessible_from(module_did, cx.tcx)) . && let all_fields_are_copy = variant . .fields . .iter() . .all(|field| { . is_copy(cx, cx.tcx.type_of(field.did).instantiate(cx.tcx, args).skip_norm_wip()) . }) . && (!has_drop(cx, binding_type) || all_fields_are_copy) . { -- line 149 ---------------------------------------- -- 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); . } . } 43,688 ( 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 }` 54 ( 0.00%) fn is_update_syntax_base<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> bool { 81 ( 0.00%) if let Some(parent) = get_parent_expr(cx, expr) 3,213 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_parent_expr (27x) 16 ( 0.00%) && let ExprKind::Struct(_, _, StructTailExpr::Base(base)) = parent.kind . { . base.hir_id == expr.hir_id . } else { . false . } 54 ( 0.00%) } 14,552 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/redundant_locals.rs -------------------------------------------------------------------------------- Ir -- line 42 ---------------------------------------- . pub REDUNDANT_LOCALS, . suspicious, . "redundant redefinition of a local binding" . } . . declare_lint_pass!(RedundantLocals => [REDUNDANT_LOCALS]); . . impl<'tcx> LateLintPass<'tcx> for RedundantLocals { 18,594 ( 0.00%) fn check_local(&mut self, cx: &LateContext<'tcx>, local: &'tcx LetStmt<'tcx>) { 12,396 ( 0.00%) if !local.span.is_desugaring(DesugaringKind::Async) 203,506 ( 0.01%) => ???:::is_desugaring (2,066x) . // the pattern is a single by-value binding 22,686 ( 0.00%) && let PatKind::Binding(BindingMode(ByRef::No, mutability), _, ident, None) = local.pat.kind . // the binding is not type-ascribed 1,832 ( 0.00%) && local.ty.is_none() . // the expression is a resolved path 5,337 ( 0.00%) && let Some(expr) = local.init 4,314 ( 0.00%) && let ExprKind::Path(qpath @ QPath::Resolved(None, path)) = expr.kind . // the path is a single segment equal to the local's name 183 ( 0.00%) && let [last_segment] = path.segments . && last_segment.ident == ident . // resolve the path to its defining binding pattern . && let Res::Local(binding_id) = cx.qpath_res(&qpath, expr.hir_id) . && let Node::Pat(binding_pat) = cx.tcx.hir_node(binding_id) . // the previous binding has the same mutability . && find_binding(binding_pat, ident).is_some_and(|bind| bind.1 == mutability) . // the local does not change the effect of assignments to the binding. see #11290 . && !affects_assignments(cx, mutability, binding_id, local.hir_id) -- line 68 ---------------------------------------- -- line 77 ---------------------------------------- . cx, . REDUNDANT_LOCALS, . local.span, . format!("redundant redefinition of a binding `{ident}`"), . Some(binding_pat.span), . format!("`{ident}` is initially defined here"), . ); . } 16,528 ( 0.00%) } . } . . /// Checks if the enclosing body is a closure and if the given local is captured by value. . /// . /// In those cases, the redefinition may be necessary to force a move: . /// ``` . /// fn assert_static(_: T) {} . /// -- line 93 ---------------------------------------- -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/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 { 372,876 ( 0.01%) fn check_expr(&mut self, cx: &LateContext<'_>, e: &Expr<'_>) { 143,328 ( 0.00%) if !e.span.from_expansion() 1,294 ( 0.00%) && let ExprKind::Unary(UnOp::Deref, deref_target) = e.kind 524 ( 0.00%) && !deref_target.span.from_expansion() 524 ( 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, . ); . } 372,876 ( 0.01%) } . } . . /// Is this a `ManuallyDrop` reached through a union, and when is `DerefMut` called on it? . enum ManuallyDropThroughUnion { . /// `ManuallyDrop` reached through a union and immediately explicitely dereferenced . Directly, . /// `ManuallyDrop` reached through a union, and dereferenced later on . Indirect, -- line 89 ---------------------------------------- 86,220 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_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::>())`. 12,873 ( 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 { . return f(&[]); . }; . . let Some(t1) = iter.next() else { 4,085 ( 0.00%) return f(&[t0]); . }; . . let Some(t2) = iter.next() else { 366 ( 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::>()) 12,873 ( 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 ---------------------------------------- 1,896 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/doc/broken_link.rs -------------------------------------------------------------------------------- Ir -- line 9 ---------------------------------------- . /// Scan and report broken link on documents. . /// It ignores false positives detected by `pulldown_cmark`, and only . /// warns users when the broken link is consider a URL. . // NOTE: We don't check these other cases because . // rustdoc itself will check and warn about it: . // - When a link url is broken across multiple lines in the URL path part . // - When a link tag is missing the close parenthesis character at the end. . // - When a link has whitespace within the url link. 8,500 ( 0.00%) pub fn check(cx: &LateContext<'_>, bl: &PullDownBrokenLink<'_>, doc: &str, fragments: &[DocFragment]) { . warn_if_broken_link(cx, bl, doc, fragments); 6,800 ( 0.00%) } . . fn warn_if_broken_link(cx: &LateContext<'_>, bl: &PullDownBrokenLink<'_>, doc: &str, fragments: &[DocFragment]) { . let mut len = 0; . . // grab raw link data 850 ( 0.00%) let (_, raw_link) = doc.split_at(bl.span.start); . . // strip off link text part . let raw_link = match raw_link.split_once(']') { . None => return, . Some((prefix, suffix)) => { . len += prefix.len() + 1; . suffix . }, . }; . . let raw_link = match raw_link.split_once('(') { . None => return, . Some((prefix, suffix)) => { 1,260 ( 0.00%) if !prefix.is_empty() { . // there is text between ']' and '(' chars, so it is not a valid link . return; . } . len += prefix.len() + 1; . suffix . }, . }; . -- line 47 ---------------------------------------- 1,700 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/no_effect.rs -------------------------------------------------------------------------------- Ir -- line 74 ---------------------------------------- . } . . impl_lint_pass!(NoEffect => [ . NO_EFFECT, . NO_EFFECT_UNDERSCORE_BINDING, . UNNECESSARY_OPERATION, . ]); . 10 ( 0.00%) #[derive(Default)] . pub struct NoEffect { . underscore_bindings: HirIdMap, . local_bindings: Vec>, . } . . impl<'tcx> LateLintPass<'tcx> for NoEffect { 51,480 ( 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); 45,760 ( 0.00%) } . . fn check_block(&mut self, _: &LateContext<'tcx>, _: &'tcx rustc_hir::Block<'tcx>) { 3 ( 0.00%) self.local_bindings.push(Vec::default()); . } . 38,227 ( 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", . ); . } . } 43,688 ( 0.00%) } . . fn check_expr(&mut self, _: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) { 50,577 ( 0.00%) if let Some(def_id) = expr.res_local_id() { 16,859 ( 0.00%) self.underscore_bindings.swap_remove(&def_id); 354,039 ( 0.01%) => /rust/deps/indexmap-2.14.0/src/map.rs:>::swap_remove:: (16,859x) . } . } . } . . impl NoEffect { . fn check_no_effect<'tcx>(&mut self, cx: &LateContext<'tcx>, stmt: &Stmt<'tcx>) -> bool { 26,986 ( 0.00%) if let StmtKind::Semi(expr) = stmt.kind { . // Covered by rustc `path_statements` lint 5,036 ( 0.00%) if matches!(expr.kind, ExprKind::Path(_)) { . return true; . } . 10,072 ( 0.00%) if expr.range_span().unwrap_or(expr.span).from_expansion() { 57,580 ( 0.00%) => ???:::range_span (2,518x) . 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; . } 11,160 ( 0.00%) if has_no_effect(cx, expr) { 74,616 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/no_effect.rs:clippy_lints::no_effect::has_no_effect (2,232x) . 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; . } 2,066 ( 0.00%) } else if let StmtKind::Let(local) = stmt.kind 14,462 ( 0.00%) && !is_lint_allowed(cx, NO_EFFECT_UNDERSCORE_BINDING, local.hir_id) 2,068,400 ( 0.06%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_lint_allowed (2,066x) . && !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. 6,696 ( 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()) . } . 24,552 ( 0.00%) fn has_no_effect(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool { 17,856 ( 0.00%) match expr.kind { . ExprKind::Lit(..) | ExprKind::Closure { .. } => true, . ExprKind::Path(..) => !expr_ty_has_significant_drop(cx, expr), . ExprKind::Index(a, b, _) | ExprKind::Binary(_, a, b) => has_no_effect(cx, a) && has_no_effect(cx, b), . ExprKind::Array(v) | ExprKind::Tup(v) => v.iter().all(|val| has_no_effect(cx, val)), . ExprKind::Repeat(inner, _) . | ExprKind::Cast(inner, _) . | ExprKind::Type(inner, _) . | ExprKind::Unary(_, inner) -- line 239 ---------------------------------------- -- line 242 ---------------------------------------- . ExprKind::Struct(_, fields, base) => { . !expr_ty_has_significant_drop(cx, expr) . && fields.iter().all(|field| has_no_effect(cx, field.expr)) . && match &base { . StructTailExpr::None | StructTailExpr::NoneWithError(_) | StructTailExpr::DefaultFields(_) => true, . StructTailExpr::Base(base) => has_no_effect(cx, base), . } . }, 88 ( 0.00%) ExprKind::Call(callee, args) => { 176 ( 0.00%) if let ExprKind::Path(ref qpath) = callee.kind { 440 ( 0.00%) if cx.typeck_results().type_dependent_def(expr.hir_id).is_some() { 3,873 ( 0.00%) => ???:::type_dependent_def (88x) . // type-dependent function call like `impl FnOnce for X` . return false; . } 308 ( 0.00%) let def_matched = matches!( 770 ( 0.00%) cx.qpath_res(qpath, callee.hir_id), 4,081 ( 0.00%) => ???:::qpath_res (77x) . Res::Def(DefKind::Struct | DefKind::Variant | DefKind::Ctor(..), ..) . ); 308 ( 0.00%) if def_matched || is_range_literal(expr) { 1,155 ( 0.00%) => ???:rustc_hir::hir::is_range_literal (77x) . !expr_ty_has_significant_drop(cx, expr) && args.iter().all(|arg| has_no_effect(cx, arg)) . } else { . false . } . } else { . false . } . }, . _ => false, . } 17,856 ( 0.00%) } . . fn check_unnecessary_operation(cx: &LateContext<'_>, stmt: &Stmt<'_>) { 8,968 ( 0.00%) if let StmtKind::Semi(expr) = stmt.kind 7,554 ( 0.00%) && !stmt.span.in_external_macro(cx.sess().source_map()) . && let ctxt = stmt.span.ctxt() 9,008 ( 0.00%) && expr.range_span().unwrap_or(expr.span).ctxt() == ctxt 50,314 ( 0.00%) => ???:::range_span (2,252x) 13,512 ( 0.00%) && let Some(reduced) = reduce_expression(cx, expr) 166,897 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/no_effect.rs:clippy_lints::no_effect::reduce_expression (2,252x) . && 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, . ); . }, . ); . } . } . } . 24,772 ( 0.00%) fn reduce_expression<'a>(cx: &LateContext<'_>, expr: &'a Expr<'a>) -> Option>> { 9,008 ( 0.00%) if expr.range_span().unwrap_or(expr.span).from_expansion() { 50,314 ( 0.00%) => ???:::range_span (2,252x) . return None; . } 15,624 ( 0.00%) match expr.kind { . ExprKind::Index(a, b, _) => Some(vec![a, b]), . ExprKind::Binary(ref binop, a, b) if binop.node != BinOpKind::And && binop.node != BinOpKind::Or => { . Some(vec![a, b]) . }, . ExprKind::Array(v) | ExprKind::Tup(v) => Some(v.iter().collect()), . ExprKind::Repeat(inner, _) . | ExprKind::Type(inner, _) . | ExprKind::Unary(_, inner) -- line 345 ---------------------------------------- -- line 359 ---------------------------------------- . } else { . let base = match base { . StructTailExpr::Base(base) => Some(base), . StructTailExpr::None | StructTailExpr::NoneWithError(_) | StructTailExpr::DefaultFields(_) => None, . }; . Some(fields.iter().map(|f| &f.expr).chain(base).map(Deref::deref).collect()) . } . }, 88 ( 0.00%) ExprKind::Call(callee, args) => { 176 ( 0.00%) if let ExprKind::Path(ref qpath) = callee.kind { 528 ( 0.00%) if cx.typeck_results().type_dependent_def(expr.hir_id).is_some() { 3,873 ( 0.00%) => ???:::type_dependent_def (88x) . // type-dependent function call like `impl FnOnce for X` . return None; . } 385 ( 0.00%) let res = cx.qpath_res(qpath, callee.hir_id); 4,081 ( 0.00%) => ???:::qpath_res (77x) 1,078 ( 0.00%) match res { . Res::Def(DefKind::Struct | DefKind::Variant | DefKind::Ctor(..), ..) . if !has_drop(cx, cx.typeck_results().expr_ty(expr)) => . { . Some(args.iter().collect()) . }, . _ => None, . } . } else { -- line 382 ---------------------------------------- -- line 394 ---------------------------------------- . } . }) . } else { . None . } . }, . _ => None, . } 18,016 ( 0.00%) } 14,637 ( 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); 179,934 ( 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() { 79,272 ( 0.00%) let doc = beautify_doc_string(doc_str, fragment_kind.comment_kind()); 3,719,559 ( 0.10%) => ???:rustc_ast::util::comments::beautify_doc_string (26,424x) 105,696 ( 0.00%) let attr_span = attr.span(); 53,084 ( 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(); . 85,107 ( 0.00%) unindent_doc_fragments(&mut doc_fragments); 8,147,980 ( 0.22%) => ???:rustc_resolve::rustdoc::unindent_doc_fragments (85,107x) . 510,642 ( 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 ---------------------------------------- 62,568 ( 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 216 ---------------------------------------- . pub fn ident(&self) -> Ident { . match *self { . ParamName::Plain(ident) | ParamName::Error(ident) => ident, . ParamName::Fresh => Ident::with_dummy_span(kw::UnderscoreLifetime), . } . } . } . 40 ( 0.00%) #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, StableHash)] . pub enum LifetimeKind { . /// User-given names or fresh (synthetic) names. . Param(LocalDefId), . . /// Implicit lifetime in a context like `dyn Foo`. This is . /// distinguished from implicit lifetimes elsewhere because the . /// lifetime that they default to must appear elsewhere within the . /// enclosing type. This means that, in an `impl Trait` context, we -- line 232 ---------------------------------------- -- line 249 ---------------------------------------- . Infer, . . /// User wrote `'static` or nothing (which gets converted to `'_`). . Static, . } . . impl LifetimeKind { . fn is_elided(&self) -> bool { 437 ( 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> { 18,700 ( 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>> { 823 ( 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 578 ---------------------------------------- . /// without a [`GenericArg`], instead directly storing a [`Ty`] or [`ConstArg`]. In . /// such cases they *are* represented by the `Infer` variants on [`TyKind`] and . /// [`ConstArgKind`] as it is not ambiguous whether the argument is a type or const. . Infer(InferArg), . } . . impl GenericArg<'_> { . pub fn span(&self) -> Span { 77 ( 0.00%) match self { . GenericArg::Lifetime(l) => l.ident.span, . GenericArg::Type(t) => t.span, . GenericArg::Const(c) => c.span, . GenericArg::Infer(i) => i.span, . } . } . . pub fn hir_id(&self) -> HirId { -- line 594 ---------------------------------------- -- line 746 ---------------------------------------- . Some(self.span_ext).filter(|span| !span.is_empty()) . } . . pub fn is_empty(&self) -> bool { . self.args.is_empty() . } . } . 5,039 ( 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. 532 ( 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 777 ---------------------------------------- . pub enum GenericBound<'hir> { . Trait(PolyTraitRef<'hir>), . Outlives(&'hir Lifetime), . Use(&'hir [PreciseCapturingArg<'hir>], Span), . } . . impl GenericBound<'_> { . pub fn trait_ref(&self) -> Option<&TraitRef<'_>> { 409 ( 0.00%) match self { . GenericBound::Trait(data) => Some(&data.trait_ref), . _ => None, . } . } . . pub fn span(&self) -> Span { . match self { . GenericBound::Trait(t, ..) => t.span, -- line 793 ---------------------------------------- -- 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 { 1,830 ( 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 { 7,422 ( 0.00%) matches!(self.kind, GenericParamKind::Lifetime { kind: LifetimeParamKind::Elided(_) }) . } . . pub fn is_lifetime(&self) -> bool { . matches!(self.kind, GenericParamKind::Lifetime { .. }) . } . } . . /// Records where the generic parameter originated from. -- line 878 ---------------------------------------- -- line 972 ---------------------------------------- . "" . } . } . . pub fn bounds_for_param( . &self, . param_def_id: LocalDefId, . ) -> impl Iterator> { 290 ( 0.00%) self.predicates.iter().filter_map(move |pred| match pred.kind { . WherePredicateKind::BoundPredicate(bp) 870 ( 0.00%) if bp.is_param_bound(param_def_id.to_def_id()) => 2,205 ( 0.00%) => ???:::is_param_bound (105x) . { . 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, . } . } . } . 130 ( 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 { 40,326 ( 0.00%) match &self { . Attribute::Unparsed(n) => { . if let [ident] = n.path.segments.as_ref() { . Some(*ident) . } else { . None . } . } . _ => None, -- line 1453 ---------------------------------------- -- line 1468 ---------------------------------------- . Some(*span) . } else { . None . } . } . . #[inline] . fn span(&self) -> Span { 237,816 ( 0.01%) 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> { 255,113 ( 0.01%) match &self { 10,240 ( 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, . } . } . . #[inline] . fn doc_str(&self) -> Option { 2 ( 0.00%) match &self { . Attribute::Parsed(AttributeKind::DocComment { comment, .. }) => Some(*comment), . _ => None, . } . } . . fn is_automatically_derived_attr(&self) -> bool { . matches!(self, Attribute::Parsed(AttributeKind::AutomaticallyDerived)) . } . . #[inline] . fn doc_str_and_fragment_kind(&self) -> Option<(Symbol, DocFragmentKind)> { 59,936 ( 0.00%) match &self { . Attribute::Parsed(AttributeKind::DocComment { kind, comment, .. }) => { 211,392 ( 0.01%) 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 { 33,982 ( 0.00%) matches!( . self, . Attribute::Parsed( . AttributeKind::ProcMacro . | AttributeKind::ProcMacroAttribute . | AttributeKind::ProcMacroDerive { .. } . ) . ) . } . . fn is_doc_hidden(&self) -> bool { 80,030 ( 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 1900 ---------------------------------------- . /// . /// 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 { . self.walk_short_(&mut it) . } . 2,825 ( 0.00%) fn walk_(&self, it: &mut impl FnMut(&Pat<'hir>) -> bool) { 71 ( 0.00%) if !it(self) { . return; . } . . use PatKind::*; 831 ( 0.00%) match self.kind { . Missing | Wild | Never | Expr(_) | Range(..) | Binding(.., None) | Err(_) => {} 2 ( 0.00%) Box(s) | Deref(s) | Ref(s, _, _) | Binding(.., Some(s)) | Guard(s, _) => s.walk_(it), . Struct(_, fields, _) => fields.iter().for_each(|field| field.pat.walk_(it)), 247 ( 0.00%) TupleStruct(_, s, _) | Tuple(s, _) | Or(s) => s.iter().for_each(|p| p.walk_(it)), 520 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/hir.rs:::walk_::<::each_binding_or_first::{closure#0}>'2 (18x) . Slice(before, slice, after) => { . before.iter().chain(slice).chain(after.iter()).for_each(|p| p.walk_(it)) . } . } 2,192 ( 0.00%) } . . /// Walk the pattern in left-to-right order. . /// . /// If `it(pat)` returns `false`, the children are not visited. . pub fn walk(&self, mut it: impl FnMut(&Pat<'hir>) -> bool) { 504 ( 0.00%) self.walk_(&mut it) 10,254 ( 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_::<::walk_always::{closure#0}> (56x) 2,458 ( 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_::<::each_binding_or_first::{closure#0}> (66x) . } . . /// Walk the pattern in left-to-right order. . /// . /// If you always want to recurse, prefer this method over `walk`. . pub fn walk_always(&self, mut it: impl FnMut(&Pat<'_>)) { . self.walk(|p| { 7 ( 0.00%) it(p); . true . }) . } . . /// Whether this a never pattern. . pub fn is_never_pattern(&self) -> bool { . let mut is_never_pattern = false; . self.walk(|pat| match &pat.kind { -- line 1945 ---------------------------------------- -- line 2036 ---------------------------------------- . RangeEnd::Excluded => "..", . }) . } . } . . // Equivalent to `Option`. That type takes up 16 bytes on 64-bit, but . // this type only takes up 4 bytes, at the cost of being restricted to a . // maximum value of `u32::MAX - 1`. In practice, this is more than enough. 228 ( 0.00%) #[derive(Clone, Copy, PartialEq, Eq, Hash, StableHash)] . pub struct DotDotPos(u32); . . impl DotDotPos { . /// Panics if n >= u32::MAX. . pub fn new(n: Option) -> Self { . match n { . Some(n) => { . assert!(n < u32::MAX as usize); . Self(n as u32) . } . None => Self(u32::MAX), . } . } . . pub fn as_opt_usize(&self) -> Option { 1,002 ( 0.00%) if self.0 == u32::MAX { None } else { Some(self.0 as usize) } . } . } . . impl fmt::Debug for DotDotPos { . fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { . self.as_opt_usize().fmt(f) . } . } -- line 2068 ---------------------------------------- -- line 2256 ---------------------------------------- . #[stable_hash(ignore)] . pub hir_id: HirId, . pub ident: Ident, . pub expr: &'hir Expr<'hir>, . pub span: Span, . pub is_shorthand: bool, . } . 32 ( 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 { 40,475 ( 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; 49,138 ( 0.00%) while let ExprKind::DropTemps(inner) = &expr.kind { 22 ( 0.00%) expr = inner; . } . expr . } . . pub fn peel_blocks(&self) -> &Self { . let mut expr = self; 747,963 ( 0.02%) while let ExprKind::Block(Block { expr: Some(inner), .. }, _) = &expr.kind { . expr = inner; . } . expr . } . . pub fn peel_borrows(&self) -> &Self { . let mut expr = self; 192,673 ( 0.01%) while let ExprKind::AddrOf(.., inner) = &expr.kind { 2,994 ( 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 _ { .. }`. 4,018 ( 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. 268 ( 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. 20,684 ( 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>> { 130,418 ( 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 }) . } . } . . impl<'hir> Ty<'hir, AmbigArg> { . pub fn peel_refs(&self) -> &Ty<'hir> { . let mut final_ty = self.as_unambig_ty(); 7,151 ( 0.00%) while let TyKind::Ref(_, MutTy { ty, .. }) = &final_ty.kind { 1,181 ( 0.00%) final_ty = ty; . } . final_ty . } . } . . impl<'hir> Ty<'hir> { . pub fn peel_refs(&self) -> &Self { . let mut final_ty = self; 231 ( 0.00%) while let TyKind::Ref(_, MutTy { ty, .. }) = &final_ty.kind { 77 ( 0.00%) 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)> { 39,025 ( 0.00%) let TyKind::Path(QPath::Resolved(None, path)) = self.kind else { . return None; . }; 11,172 ( 0.00%) let [segment] = &path.segments else { . return None; . }; 31,688 ( 0.00%) match path.res { 1,156 ( 0.00%) Res::Def(DefKind::TyParam, def_id) | Res::SelfTyParam { trait_: def_id } => { 1,112 ( 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` 3,008 ( 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) 332 ( 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 { 4,124 ( 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 { 2,062 ( 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 { 10,282 ( 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 { 5,363 ( 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 { 17,148 ( 0.00%) match *self { 271 ( 0.00%) Self::DefaultReturn(span) => span, 7,809 ( 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>] { 210 ( 0.00%) match *self { 4 ( 0.00%) VariantData::Struct { fields, .. } | VariantData::Tuple(fields, ..) => fields, . _ => &[], . } . } . . pub fn ctor(&self) -> Option<(CtorKind, HirId, LocalDefId)> { 2 ( 0.00%) match *self { . VariantData::Tuple(_, hir_id, def_id) => Some((CtorKind::Fn, hir_id, def_id)), . VariantData::Unit(hir_id, def_id) => Some((CtorKind::Const, hir_id, def_id)), . VariantData::Struct { .. } => None, . } . } . . #[inline] . pub fn ctor_kind(&self) -> Option { -- line 4546 ---------------------------------------- -- 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. 16,876 ( 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 4714 ---------------------------------------- . fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { . f.write_str(match *self { . Self::Unsafe => "unsafe", . Self::Safe => "safe", . }) . } . } . 26 ( 0.00%) #[derive(Copy, Clone, PartialEq, Eq, Debug, Encodable, Decodable, StableHash)] . pub enum Constness { . Const { always: bool }, . NotConst, . } . . /// This impl exists as an optimization so that metadata deserialization can . /// store the value directly and not have to encode it wrapped in another `Option`. . impl Default for Constness { -- line 4730 ---------------------------------------- -- line 4789 ---------------------------------------- . pub safety: HeaderSafety, . pub constness: Constness, . pub asyncness: IsAsync, . pub abi: ExternAbi, . } . . impl FnHeader { . pub fn is_async(&self) -> bool { 3,410 ( 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 { 15,052 ( 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 { 2,019 ( 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, . } 289 ( 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 ---------------------------------------- 497,223 ( 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/cell.rs -------------------------------------------------------------------------------- Ir -- line 410 ---------------------------------------- . /// use std::cell::Cell; . /// . /// let c = Cell::new(5); . /// ``` . #[stable(feature = "rust1", since = "1.0.0")] . #[rustc_const_stable(feature = "const_cell_new", since = "1.24.0")] . #[inline] . pub const fn new(value: T) -> Cell { 1 ( 0.00%) Cell { value: UnsafeCell::new(value) } . } . . /// Sets the contained value. . /// . /// # Examples . /// . /// ``` . /// use std::cell::Cell; -- line 426 ---------------------------------------- -- 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. 233,951 ( 0.01%) unsafe { *self.value.get() } . } . . /// Updates the contained value using a function. . /// . /// # Examples . /// . /// ``` . /// use std::cell::Cell; -- line 566 ---------------------------------------- -- line 2050 ---------------------------------------- . } . . #[rustc_const_unstable(feature = "const_ref_cell", issue = "137844")] . const impl Drop for BorrowRefMut<'_> { . #[inline] . fn drop(&mut self) { . let borrow = self.borrow.get(); . debug_assert!(is_writing(borrow)); 23 ( 0.00%) self.borrow.replace(borrow + 1); . } . } . . impl<'b> BorrowRefMut<'b> { . #[inline] . const fn new(borrow: &'b Cell) -> Option> { . // NOTE: Unlike BorrowRefMut::clone, new is called to create the initial . // mutable reference, and so there must currently be no existing . // references. Thus, while clone increments the mutable refcount, here . // we explicitly only allow going from UNUSED to UNUSED - 1. 2,572 ( 0.00%) match borrow.get() { . UNUSED => { . borrow.replace(UNUSED - 1); . Some(BorrowRefMut { borrow }) . } . _ => None, . } . } . -- line 2077 ---------------------------------------- 53,756 ( 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>) { 186,438 ( 0.01%) if cx.tcx.sess.edition() >= Edition2024 { . return; . } . 62,252 ( 0.00%) if let Some(higher::IfLet { 31 ( 0.00%) let_expr, 31 ( 0.00%) if_then, . if_else: Some(if_else), . .. 124,504 ( 0.00%) }) = higher::IfLet::hir(cx, expr) 342,285 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/higher.rs:::hir (62,146x) 62 ( 0.00%) && let ctxt = expr.span.ctxt() 62 ( 0.00%) && let Some(op_mutex) = for_each_expr_without_closures(let_expr, |e| mutex_lock_call(cx, ctxt, e, None)) . && let Some(arm_mutex) = . for_each_expr_without_closures((if_then, if_else), |e| mutex_lock_call(cx, ctxt, e, Some(op_mutex))) . { . let diag = |diag: &mut Diag<'_, ()>| { . diag.span_label( . op_mutex.span, . "this Mutex will remain locked for the entire `if let`-block...", . ); -- line 74 ---------------------------------------- -- line 81 ---------------------------------------- . span_lint_and_then( . cx, . IF_LET_MUTEX, . expr.span, . "calling `Mutex::lock` inside the scope of another `Mutex::lock` causes a deadlock", . diag, . ); . } 62,146 ( 0.00%) } . } . . fn mutex_lock_call<'tcx>( . cx: &LateContext<'tcx>, . ctxt: SyntaxContext, . expr: &'tcx Expr<'_>, . op_mutex: Option<&'tcx Expr<'_>>, . ) -> ControlFlow<&'tcx Expr<'tcx>> { 316 ( 0.00%) if let ExprKind::MethodCall(path, self_arg, [], _) = &expr.kind 8 ( 0.00%) && path.ident.name == sym::lock . && let ty = cx.typeck_results().expr_ty(self_arg).peel_refs() . && ty.is_diag_item(cx, sym::Mutex) . && op_mutex.is_none_or(|op| eq_expr_value(cx, ctxt, self_arg, op)) . { . ControlFlow::Break(self_arg) . } else { . ControlFlow::Continue(()) . } -- line 107 ---------------------------------------- 1,056,606 ( 0.03%) -------------------------------------------------------------------------------- -- 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 7,658 ( 0.00%) if self.outermost_debug_impl.is_none() && is_debug_impl(cx, item) { 498 ( 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) { 249 ( 0.00%) self.outermost_debug_impl = None; . } . } . 621,460 ( 0.02%) fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) { 3,066 ( 0.00%) let Some(macro_call) = root_macro_call_first_node(cx, expr) else { . return; . }; 3,577 ( 0.00%) let Some(diag_name) = cx.tcx.get_diagnostic_name(macro_call.def_id) else { 43,226 ( 0.00%) => ???:::get_diagnostic_name (511x) . return; . }; 948 ( 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"); . 948 ( 0.00%) let allowed_in_tests = self.allow_print_in_tests && is_in_test(cx.tcx, expr.hir_id); . match diag_name { 3,722 ( 0.00%) sym::print_macro | sym::println_macro if !allowed_in_tests => { 2 ( 0.00%) if !is_build_script { 4 ( 0.00%) 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 => {}, . _ => return, . } . 1,680 ( 0.00%) if let Some(format_args) = self.format_args.get(cx, expr, macro_call.expn) { 284,047 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/macros.rs:::get (210x) . // ignore `writeln!(w)` and `write!(v, some_macro!())` 420 ( 0.00%) if format_args.span.from_expansion() { . return; . } . . match diag_name { 926 ( 0.00%) sym::print_macro | sym::eprint_macro | sym::write_macro => { 1,169 ( 0.00%) with_newline::check(cx, format_args, ¯o_call, name); 889,563 ( 0.02%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/write/with_newline.rs:clippy_lints::write::with_newline::check (167x) . }, . sym::println_macro | sym::eprintln_macro | sym::writeln_macro => { 258 ( 0.00%) empty_string::check(cx, format_args, ¯o_call, name); 3,258,088 ( 0.09%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/write/empty_string.rs:clippy_lints::write::empty_string::check (43x) . }, . _ => {}, . } . 1,050 ( 0.00%) literal::check(cx, format_args, name); 45,985 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/write/literal.rs:clippy_lints::write::literal::check (210x) . 210 ( 0.00%) if !self.in_debug_impl() { 304 ( 0.00%) use_debug::check(cx, format_args); 22,542 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/write/use_debug.rs:clippy_lints::write::use_debug::check (76x) . } . } 497,168 ( 0.01%) } . } . . fn is_debug_impl(cx: &LateContext<'_>, item: &Item<'_>) -> bool { 15,396 ( 0.00%) if let ItemKind::Impl(Impl { . of_trait: Some(of_trait), . .. . }) = &item.kind 2,520 ( 0.00%) && let Some(trait_id) = of_trait.trait_ref.trait_def_id() 10,920 ( 0.00%) => ???:::trait_def_id (840x) . { 3,360 ( 0.00%) cx.tcx.is_diagnostic_item(sym::Debug, trait_id) 83,459 ( 0.00%) => ???:::is_diagnostic_item (840x) . } else { . false . } . } 1,525 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/escape.rs -------------------------------------------------------------------------------- Ir -- line 50 ---------------------------------------- . "using `Box` where unnecessary" . } . . impl_lint_pass!(BoxedLocal => [BOXED_LOCAL]); . . /// Whether `ty` is a `Box` where `T` is not a trait object and is small enough to live on the . /// stack (large types are boxed to avoid stack overflows). . fn is_small_non_trait_box<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, too_large_for_stack: u64) -> bool { 5,574 ( 0.00%) ty.boxed_ty().is_some_and(|boxed| { 18,318 ( 0.00%) => ???:::boxed_ty (2,787x) 3 ( 0.00%) !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 { 28,210 ( 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 13,849 ( 0.00%) if matches!(fn_kind, intravisit::FnKind::Closure) { . return; . } . . if let Some(header) = fn_kind.header() 7,626 ( 0.00%) && header.abi != ExternAbi::Rust . { . return; . } . 2,542 ( 0.00%) let parent_id = cx . .tcx 2,542 ( 0.00%) .hir_get_parent_item(cx.tcx.local_def_id_to_hir_id(fn_def_id)) 348,684 ( 0.01%) => ???:::hir_get_parent_item (2,542x) . .def_id; . 2,542 ( 0.00%) let mut trait_self_ty = None; 28,514 ( 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 => { 12 ( 0.00%) trait_self_ty = Some(TraitRef::identity(cx.tcx, parent_id.to_def_id()).self_ty()); . }, . . _ => {}, . } . 3,348 ( 0.00%) let typeck_results = cx.tcx.typeck_body(body.id()); 352,342 ( 0.01%) => ???:::typeck_body (1,674x) . . // 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. 3,348 ( 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. 5,578 ( 0.00%) if !matches!(param.pat.kind, PatKind::Binding(..)) { . return None; . } . 8,361 ( 0.00%) let ty = typeck_results.pat_ty(param.pat); 111,480 ( 0.00%) => ???:::pat_ty (2,787x) 2,787 ( 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 9 ( 0.00%) if let Some(trait_self_ty) = trait_self_ty . && cx.tcx.hir_name(param.pat.hir_id) == kw::SelfLower . && ty.contains(trait_self_ty) . { . return None; . } . 6 ( 0.00%) Some(param.pat.hir_id) . }) . .collect(); . . // Without any candidate parameter, the expensive `ExprUseVisitor` walk can never lint. 1,674 ( 0.00%) if set.is_empty() { . return; . } . 18 ( 0.00%) let mut v = EscapeDelegate { set }; . . ExprUseVisitor::for_clippy(cx, fn_def_id, &mut v) 6 ( 0.00%) .consume_body(body) 115,650 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir_typeck/src/expr_use_visitor.rs:>::consume_body (3x) . .into_ok(); . 21 ( 0.00%) for node in v.set { . span_lint_hir( . cx, . BOXED_LOCAL, . node, . cx.tcx.hir_span(node), . "local variable doesn't need to be boxed here", . ); . } 22,568 ( 0.00%) } . } . . impl<'tcx> Delegate<'tcx> for EscapeDelegate { . fn consume(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId) { 58 ( 0.00%) if cmt.place.projections.is_empty() 8 ( 0.00%) && let PlaceBase::Local(lid) = cmt.place.base . { . // FIXME(rust/#120456) - is `swap_remove` correct? . self.set.swap_remove(&lid); . } . } . . fn use_cloned(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {} . . fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, _: ty::BorrowKind) { 126 ( 0.00%) if cmt.place.projections.is_empty() 7 ( 0.00%) && let PlaceBase::Local(lid) = cmt.place.base . { . // FIXME(rust/#120456) - is `swap_remove` correct? . self.set.swap_remove(&lid); . } . } . . fn mutate(&mut self, _: &PlaceWithHirId<'tcx>, _: HirId) {} . -- line 181 ---------------------------------------- 12,120 ( 0.00%) -------------------------------------------------------------------------------- -- 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 8,463 ( 0.00%) if !is_trait_impl_item(cx, hir_id) 398,462 ( 0.01%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::is_trait_impl_item (2,821x) . // don't lint extern functions decls, it's not their fault either 8,370 ( 0.00%) && kind.header().is_some_and(|header| header.abi == ExternAbi::Rust) 78,678 ( 0.00%) => ???:::eq (1,674x) . { . 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) { 350 ( 0.00%) if let hir::TraitItemKind::Fn(ref sig, _) = item.kind . // don't lint extern functions decls, it's not their fault 350 ( 0.00%) && sig.header.abi == ExternAbi::Rust 3,290 ( 0.00%) => ???:::eq (70x) . { 70 ( 0.00%) check_arg_number( . cx, 70 ( 0.00%) sig.decl, 70 ( 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) { 1,744 ( 0.00%) let args = decl.inputs.len() as u64; 3,488 ( 0.00%) if args > too_many_arguments_threshold { . span_lint( . cx, . TOO_MANY_ARGUMENTS, . fn_span, 6 ( 0.00%) format!("this function has too many arguments ({args}/{too_many_arguments_threshold})"), . ); . } . } 141 ( 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 { 38,568 ( 0.00%) fn check_block(&mut self, cx: &EarlyContext<'_>, block: &Block) { . for w in block.stmts.windows(2) { 11,160 ( 0.00%) if let (StmtKind::Expr(first), StmtKind::Expr(second) | StmtKind::Semi(second)) = (&w[0].kind, &w[1].kind) { 1,298 ( 0.00%) check_missing_else(cx, first, second); . } . } 38,568 ( 0.00%) } . 346,136 ( 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); 395,584 ( 0.01%) } . } . . /// Implementation of the `SUSPICIOUS_ASSIGNMENT_FORMATTING` lint. . fn check_assign(cx: &EarlyContext<'_>, expr: &Expr) { 148,344 ( 0.00%) if let ExprKind::Assign(ref lhs, ref rhs, _) = expr.kind 1,887 ( 0.00%) && !lhs.span.from_expansion() 1,887 ( 0.00%) && !rhs.span.from_expansion() . { 2,500 ( 0.00%) let eq_span = lhs.span.between(rhs.span); 66,875 ( 0.00%) => ???:::between (625x) 1,252 ( 0.00%) if let ExprKind::Unary(op, ref sub_rhs) = rhs.kind 4 ( 0.00%) && let Some(eq_snippet) = snippet_opt(cx, eq_span) . { . let op = op.as_str(); 8 ( 0.00%) let eqop_span = lhs.span.between(sub_rhs.span); 214 ( 0.00%) => ???:::between (2x) 2 ( 0.00%) if eq_snippet.ends_with('=') { . span_lint_and_note( . cx, . SUSPICIOUS_ASSIGNMENT_FORMATTING, . eqop_span, . format!( . "this looks like you are trying to use `.. {op}= ..`, but you \ . really are doing `.. = ({op} ..)`" . ), -- line 185 ---------------------------------------- -- line 188 ---------------------------------------- . ); . } . } . } . } . . /// Implementation of the `SUSPICIOUS_UNARY_OP_FORMATTING` lint. . fn check_unop(cx: &EarlyContext<'_>, expr: &Expr) { 97,638 ( 0.00%) if let ExprKind::Binary(ref binop, ref lhs, ref rhs) = expr.kind 9,615 ( 0.00%) && !lhs.span.from_expansion() && !rhs.span.from_expansion() . // span between BinOp LHS and RHS 6,060 ( 0.00%) && let binop_span = lhs.span.between(rhs.span) 162,105 ( 0.00%) => ???:::between (1,515x) . // if RHS is an UnOp 3,069 ( 0.00%) && let ExprKind::Unary(op, ref un_rhs) = rhs.kind . // from UnOp operator to UnOp operand 195 ( 0.00%) && let unop_operand_span = rhs.span.until(un_rhs.span) 4,056 ( 0.00%) => ???:::until (39x) 78 ( 0.00%) && let Some(binop_snippet) = snippet_opt(cx, binop_span) 78 ( 0.00%) && let Some(unop_operand_snippet) = snippet_opt(cx, unop_operand_span) 117 ( 0.00%) && let binop_str = binop.node.as_str() . // no space after BinOp operator and space after UnOp operator 39 ( 0.00%) && binop_snippet.ends_with(binop_str) && unop_operand_snippet.ends_with(' ') . { . let unop_str = op.as_str(); . let eqop_span = lhs.span.between(un_rhs.span); . span_lint_and_help( . cx, . SUSPICIOUS_UNARY_OP_FORMATTING, . eqop_span, . format!( -- line 216 ---------------------------------------- -- line 220 ---------------------------------------- . None, . format!("put a space between `{binop_str}` and `{unop_str}` and remove the space after `{unop_str}`"), . ); . } . } . . /// Implementation of the `SUSPICIOUS_ELSE_FORMATTING` lint for weird `else`. . fn check_else(cx: &EarlyContext<'_>, expr: &Expr) { 97,771 ( 0.00%) if let ExprKind::If(_, then, Some(else_)) = &expr.kind 491 ( 0.00%) && (is_block(else_) || is_if(else_)) 1,403 ( 0.00%) && !then.span.from_expansion() && !else_.span.from_expansion() 1,120 ( 0.00%) && !expr.span.in_external_macro(cx.sess().source_map()) . . // workaround for rust-lang/rust#43081 1,120 ( 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) 1,120 ( 0.00%) && let else_span = then.span.between(else_.span) 29,960 ( 0.00%) => ???:::between (280x) . . // the snippet should look like " else \n " with maybe comments anywhere . // it’s bad when there is a ‘\n’ after the “else” 2,240 ( 0.00%) && let Some(else_snippet) = snippet_opt(cx, else_span) 119,840 ( 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> (280x) 2,240 ( 0.00%) && let Some((pre_else, post_else)) = else_snippet.split_once("else") 103,880 ( 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> (280x) 560 ( 0.00%) && !else_snippet.contains('/') 1,680 ( 0.00%) && let Some((_, post_else_post_eol)) = post_else.split_once('\n') 12,320 ( 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:: (280x) . { . // 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) { 91,916 ( 0.00%) if let ExprKind::Array(ref array) = expr.kind { . for element in array { 984 ( 0.00%) if let ExprKind::Binary(ref op, ref lhs, _) = element.kind . && has_unary_equivalent(op.node) . && lhs.span.eq_ctxt(op.span) . && let space_span = lhs.span.between(op.span) . && let Some(space_snippet) = snippet_opt(cx, space_span) . && let lint_span = lhs.span.with_lo(lhs.span.hi()) . && space_snippet.contains('\n') . && indentation(cx, op.span) <= indentation(cx, lhs.span) . { -- line 300 ---------------------------------------- -- line 307 ---------------------------------------- . "to remove this lint, add a comma or write the expr in a single line", . ); . } . } . } . } . . fn check_missing_else(cx: &EarlyContext<'_>, first: &Expr, second: &Expr) { 3,230 ( 0.00%) if !first.span.from_expansion() && !second.span.from_expansion() . && matches!(first.kind, ExprKind::If(..)) 1,364 ( 0.00%) && (is_block(second) || is_if(second)) . . // Proc-macros can give weird spans. Make sure this is actually an `if`. 543 ( 0.00%) && is_span_if(cx, first.span) . . // If there is a line break between the two expressions, don't lint. . // If there is a non-whitespace character, this span came from a proc-macro. 905 ( 0.00%) && let else_span = first.span.between(second.span) 19,367 ( 0.00%) => ???:::between (181x) 905 ( 0.00%) && let Some(else_snippet) = snippet_opt(cx, else_span) 724 ( 0.00%) && !else_snippet.chars().any(|c| c == '\n' || !c.is_whitespace()) . { . let (looks_like, next_thing) = if is_if(second) { . ("an `else if`", "the second `if`") . } else { . ("an `else {..}`", "the next block") . }; . . span_lint_and_note( -- line 334 ---------------------------------------- -- line 338 ---------------------------------------- . format!("this looks like {looks_like} but the `else` is missing"), . None, . format!("to remove this lint, add the missing `else` or add a new line before {next_thing}"), . ); . } . } . . fn is_block(expr: &Expr) -> bool { 1,474 ( 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,461 ( 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 { 9,985 ( 0.00%) visitor.$f(self) 6,233,442 ( 0.17%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs: as rustc_hir::intravisit::Visitor>::visit_expr (513x) . } . } . }; . } . visitable_ref!(Arm, visit_arm); . visitable_ref!(Block, visit_block); . visitable_ref!(Body, visit_body); . visitable_ref!(Expr, visit_expr); . visitable_ref!(Stmt, visit_stmt); . . /// Calls the given function once for each expression contained. This does not enter any bodies or . /// nested items. 1,123 ( 0.00%) pub fn for_each_expr_without_closures<'tcx, B, C: Continue>( . node: impl Visitable<'tcx>, . f: impl FnMut(&'tcx Expr<'tcx>) -> ControlFlow, . ) -> Option { . struct V { . f: F, . } . impl<'tcx, B, C: Continue, F: FnMut(&'tcx Expr<'tcx>) -> ControlFlow> Visitor<'tcx> for V { . type Result = ControlFlow; . 180,641 ( 0.00%) fn visit_expr(&mut self, e: &'tcx Expr<'tcx>) -> Self::Result { 127,977 ( 0.00%) match (self.f)(e) { 486,611 ( 0.01%) ControlFlow::Continue(c) if c.descend() => walk_expr(self, e), 12,344 ( 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::> (7x) 156 ( 0.00%) ControlFlow::Break(b) => ControlFlow::Break(b), 39 ( 0.00%) ControlFlow::Continue(_) => ControlFlow::Continue(()), 12 ( 0.00%) } 74,077 ( 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(()) . } . } 25,722 ( 0.00%) let mut v = V { f }; . node.visit(&mut v).break_value() 1,122 ( 0.00%) } . . /// Calls the given function once for each expression contained. This will enter bodies, but not . /// nested items. 7 ( 0.00%) pub fn for_each_expr<'tcx, B, C: Continue>( . tcx: TyCtxt<'tcx>, . node: impl Visitable<'tcx>, . f: impl FnMut(&'tcx Expr<'tcx>) -> ControlFlow, . ) -> Option { . struct V<'tcx, F> { . tcx: TyCtxt<'tcx>, . f: F, . } -- line 155 ---------------------------------------- -- line 156 ---------------------------------------- . impl<'tcx, B, C: Continue, F: FnMut(&'tcx Expr<'tcx>) -> ControlFlow> Visitor<'tcx> for V<'tcx, F> { . type NestedFilter = nested_filter::OnlyBodies; . type Result = ControlFlow; . . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { . self.tcx . } . 78,950 ( 0.00%) fn visit_expr(&mut self, e: &'tcx Expr<'tcx>) -> Self::Result { 1,076 ( 0.00%) match (self.f)(e) { 50 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::::{closure#0}>>'2 (2x) 28,188 ( 0.00%) ControlFlow::Continue(c) if c.descend() => walk_expr(self, e), 1,176 ( 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::> (49x) . ControlFlow::Break(b) => ControlFlow::Break(b), . ControlFlow::Continue(_) => ControlFlow::Continue(()), . } 68,925 ( 0.00%) } . . // Only walk closures . fn visit_anon_const(&mut self, _: &'tcx AnonConst) -> Self::Result { . ControlFlow::Continue(()) . } . // Avoid unnecessary `walk_*` calls. . fn visit_ty(&mut self, _: &'tcx hir::Ty<'tcx, AmbigArg>) -> Self::Result { . ControlFlow::Continue(()) -- line 178 ---------------------------------------- -- line 183 ---------------------------------------- . fn visit_qpath(&mut self, _: &'tcx QPath<'tcx>, _: HirId, _: Span) -> Self::Result { . ControlFlow::Continue(()) . } . // Avoid monomorphising all `visit_*` functions. . fn visit_nested_item(&mut self, _: ItemId) -> Self::Result { . ControlFlow::Continue(()) . } . } 6,888 ( 0.00%) let mut v = V { tcx, f }; . node.visit(&mut v).break_value() 14 ( 0.00%) } . . /// returns `true` if expr contains match expr desugared from try 12 ( 0.00%) fn contains_try(expr: &Expr<'_>) -> bool { . for_each_expr_without_closures(expr, |e| { 58 ( 0.00%) if matches!(e.kind, ExprKind::Match(_, _, hir::MatchSource::TryDesugar(_))) { . ControlFlow::Break(()) . } else { . ControlFlow::Continue(()) . } . }) . .is_some() 12 ( 0.00%) } . . pub fn find_all_ret_expressions<'hir, F>(_cx: &LateContext<'_>, expr: &'hir Expr<'hir>, callback: F) -> bool . where . F: FnMut(&'hir Expr<'hir>) -> bool, . { . struct RetFinder { . in_stmt: bool, . failed: bool, -- line 213 ---------------------------------------- -- line 240 ---------------------------------------- . impl std::ops::DerefMut for WithStmtGuard<'_, F> { . fn deref_mut(&mut self) -> &mut Self::Target { . self.val . } . } . . impl Drop for WithStmtGuard<'_, F> { . fn drop(&mut self) { 1 ( 0.00%) self.val.in_stmt = self.prev_in_stmt; . } . } . . impl<'hir, F: FnMut(&'hir Expr<'hir>) -> bool> Visitor<'hir> for RetFinder { . fn visit_stmt(&mut self, stmt: &'hir Stmt<'_>) { 3 ( 0.00%) intravisit::walk_stmt(&mut *self.inside_stmt(true), stmt); 532 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_stmt::::lint_closure::{closure#0}>> (1x) . } . 140 ( 0.00%) fn visit_expr(&mut self, expr: &'hir Expr<'_>) { 40 ( 0.00%) if self.failed { . return; . } 40 ( 0.00%) if self.in_stmt { 14 ( 0.00%) match expr.kind { . ExprKind::Ret(Some(expr)) => self.inside_stmt(false).visit_expr(expr), 14 ( 0.00%) _ => walk_expr(self, expr), . } . } else { 55 ( 0.00%) match expr.kind { . ExprKind::If(cond, then, else_opt) => { . self.inside_stmt(true).visit_expr(cond); . self.visit_expr(then); . if let Some(el) = else_opt { . self.visit_expr(el); . } . }, . ExprKind::Match(cond, arms, _) => { . self.inside_stmt(true).visit_expr(cond); . for arm in arms { . self.visit_expr(arm.body); . } . }, 2 ( 0.00%) ExprKind::Block(..) => walk_expr(self, expr), . ExprKind::Ret(Some(expr)) => self.visit_expr(expr), 24 ( 0.00%) _ => self.failed |= !(self.cb)(expr), . } . } 96 ( 0.00%) } . } . 48 ( 0.00%) !contains_try(expr) && { 2,392 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::contains_try (12x) 72 ( 0.00%) let mut ret_finder = RetFinder { . in_stmt: false, . failed: false, . cb: callback, . }; 24 ( 0.00%) ret_finder.visit_expr(expr); 1,097 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:::lint_closure::{closure#0}> as rustc_hir::intravisit::Visitor>::visit_expr (12x) . !ret_finder.failed . } . } . . /// Checks if the given resolved path is used in the given body. . pub fn is_res_used(cx: &LateContext<'_>, res: Res, body: BodyId) -> bool { . for_each_expr(cx.tcx, cx.tcx.hir_body(body).value, |e| { . if let ExprKind::Path(p) = &e.kind -- line 303 ---------------------------------------- -- line 307 ---------------------------------------- . } . ControlFlow::Continue(()) . }) . .is_some() . } . . /// Checks if the given local is used. . pub fn is_local_used<'tcx>(cx: &LateContext<'tcx>, visitable: impl Visitable<'tcx>, id: HirId) -> bool { 54 ( 0.00%) for_each_expr(cx.tcx, visitable, |e| { 46 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_expr::<(), (), &rustc_hir::hir::Expr, clippy_utils::visitors::is_local_used<&rustc_hir::hir::Expr>::{closure#0}> (1x) . if e.res_local_id() == Some(id) { . ControlFlow::Break(()) . } else { . ControlFlow::Continue(()) . } . }) . .is_some() . } . . /// Returns whether the given expression can be evaluated as a constant assuming that all its sub . /// expressions can be evaluated as constants. 645 ( 0.00%) fn is_const_evaluatable_helper<'tcx>(tcx: TyCtxt<'tcx>, typeck: &'tcx TypeckResults<'tcx>, e: &'tcx Expr<'_>) -> bool { 1,566 ( 0.00%) match e.kind { . ExprKind::Call( . &Expr { 5 ( 0.00%) kind: ExprKind::Path(ref p), . hir_id, . .. . }, . _, 15 ( 0.00%) ) if typeck 20 ( 0.00%) .qpath_res(p, hir_id) 283 ( 0.00%) => ???:::qpath_res (5x) . .opt_def_id() 25 ( 0.00%) .is_some_and(|id| is_stable_const_fn_at(tcx, CRATE_HIR_ID, id, Msrv::default())) => 5,140 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/qualify_min_const_fn.rs:clippy_utils::qualify_min_const_fn::is_stable_const_fn_at (5x) . { . true . }, . ExprKind::MethodCall(..) . if typeck 415 ( 0.00%) .type_dependent_def_id(e.hir_id) 4,233 ( 0.00%) => ???:::type_dependent_def_id (83x) 747 ( 0.00%) .is_some_and(|id| is_stable_const_fn_at(tcx, CRATE_HIR_ID, id, Msrv::default())) => 73,076 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/qualify_min_const_fn.rs:clippy_utils::qualify_min_const_fn::is_stable_const_fn_at (83x) . { . true . }, . ExprKind::Binary(_, lhs, rhs) 155 ( 0.00%) if typeck.expr_ty(lhs).peel_refs().is_primitive_ty() 1,240 ( 0.00%) => ???:::expr_ty (31x) 60 ( 0.00%) && typeck.expr_ty(rhs).peel_refs().is_primitive_ty() => 1,200 ( 0.00%) => ???:::expr_ty (30x) . { . true . }, . ExprKind::Unary(UnOp::Deref, e) if typeck.expr_ty(e).is_raw_ptr() => true, 69 ( 0.00%) ExprKind::Unary(_, e) if typeck.expr_ty(e).peel_refs().is_primitive_ty() => true, 920 ( 0.00%) => ???:::expr_ty (23x) . ExprKind::Index(base, _, _) 8 ( 0.00%) if matches!(typeck.expr_ty(base).peel_refs().kind(), ty::Slice(_) | ty::Array(..)) => 80 ( 0.00%) => ???:::expr_ty (2x) . { . true . }, 55 ( 0.00%) ExprKind::Path(ref p) 219 ( 0.00%) if matches!( 390 ( 0.00%) typeck.qpath_res(p, e.hir_id), 825 ( 0.00%) => ???:::qpath_res (55x) . Res::Def( . DefKind::Const { .. } . | DefKind::AssocConst { .. } . | DefKind::AnonConst . | DefKind::ConstParam . | DefKind::Ctor(..) . | DefKind::Fn . | DefKind::AssocFn, -- line 373 ---------------------------------------- -- line 392 ---------------------------------------- . | ExprKind::Repeat(..) . | ExprKind::Struct(..) . | ExprKind::Tup(_) . | ExprKind::Type(..) . | ExprKind::UnsafeBinderCast(..) => true, . . _ => false, . } 660 ( 0.00%) } . . /// Checks if the given expression can be evaluated as a constant at the specified node 345 ( 0.00%) pub fn is_const_evaluatable<'tcx>(tcx: TyCtxt<'tcx>, typeck: &'tcx TypeckResults<'tcx>, e: &'tcx Expr<'_>) -> bool { . for_each_expr(tcx, e, move |e| { 1,704 ( 0.00%) if !is_const_evaluatable_helper(tcx, typeck, e) { 36,168 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::is_const_evaluatable_helper (84x) . ControlFlow::Break(()) . } else if matches!(e.kind, ExprKind::ConstBlock(_)) { . ControlFlow::Continue(Descend::No) . } else { . ControlFlow::Continue(Descend::Yes) . } . }) . .is_none() 345 ( 0.00%) } . . /// Checks if the given expression can be used as a const parameter. . /// . /// This is more strict than `is_const_evaluatable` as it requires that the expression does not . /// contain any type parameters or any operations on const parameters. . pub fn is_const_param_evaluatable<'tcx>( . tcx: TyCtxt<'tcx>, . typeck: &'tcx TypeckResults<'tcx>, -- line 422 ---------------------------------------- -- line 602 ---------------------------------------- . }, . ExprKind::DropTemps(e) => for_each_value_source(e, f), . _ => f(e), . } . } . . /// Runs the given function for each path expression referencing the given local which occur after . /// the given expression. 351 ( 0.00%) pub fn for_each_local_use_after_expr<'tcx, B>( . cx: &LateContext<'tcx>, . local_id: HirId, . expr_id: HirId, . f: impl FnMut(&'tcx Expr<'tcx>) -> ControlFlow, . ) -> ControlFlow { . struct V<'cx, 'tcx, F, B> { . cx: &'cx LateContext<'tcx>, . local_id: HirId, -- line 618 ---------------------------------------- -- line 619 ---------------------------------------- . expr_id: HirId, . found: bool, . res: ControlFlow, . f: F, . } . impl<'tcx, F: FnMut(&'tcx Expr<'tcx>) -> ControlFlow, B> Visitor<'tcx> for V<'_, 'tcx, F, B> { . type NestedFilter = nested_filter::OnlyBodies; . fn maybe_tcx(&mut self) -> Self::MaybeTyCtxt { 14 ( 0.00%) self.cx.tcx . } . . fn visit_expr(&mut self, e: &'tcx Expr<'tcx>) { 5,624 ( 0.00%) if !self.found { 1,460 ( 0.00%) if e.hir_id == self.expr_id { 73,970 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::::expr_usage_requires_vec::{closure#0}, ()>> (39x) 27 ( 0.00%) self.found = true; . } else { . walk_expr(self, e); . } . return; . } 2,748 ( 0.00%) if self.res.is_break() { . return; . } 382 ( 0.00%) if e.res_local_id() == Some(self.local_id) { 64 ( 0.00%) => /home/moon/.rustup/toolchains/nightly-2026-08-07-x86_64-unknown-linux-gnu/lib/rustlib/rustc-src/rust/compiler/rustc_hir/src/intravisit.rs:rustc_hir::intravisit::walk_expr::::expr_usage_requires_vec::{closure#0}, ()>>'2 (1x) 153 ( 0.00%) self.res = (self.f)(e); 206 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_lints/src/useless_vec.rs:::expr_usage_requires_vec::{closure#0} (1x) . } else { . walk_expr(self, e); . } 1 ( 0.00%) } . } . 81 ( 0.00%) if let Some(b) = get_enclosing_block(cx, local_id) { 12,933 ( 0.00%) => /home/moon/git/rustc-perf/site/frontend/rust-clippy/clippy_utils/src/lib.rs:clippy_utils::get_enclosing_block (27x) 189 ( 0.00%) let mut v = V { . cx, . local_id, . expr_id, . found: false, . res: ControlFlow::Continue(()), . f, . }; . v.visit_block(b); 54 ( 0.00%) v.res . } else { . ControlFlow::Continue(()) . } 216 ( 0.00%) } . . // Calls the given function for every unconsumed temporary created by the expression. Note the . // function is only guaranteed to be called for types which need to be dropped, but it may be called . // for other types. . #[expect(clippy::too_many_lines)] . pub fn for_each_unconsumed_temporary<'tcx, B>( . cx: &LateContext<'tcx>, . e: &'tcx Expr<'tcx>, . mut f: impl FnMut(Ty<'tcx>) -> ControlFlow, . ) -> ControlFlow { . // Todo: Handle partially consumed values. 860 ( 0.00%) fn helper<'tcx, B>( . typeck: &'tcx TypeckResults<'tcx>, . consume: bool, . e: &'tcx Expr<'tcx>, . f: &mut impl FnMut(Ty<'tcx>) -> ControlFlow, . ) -> ControlFlow { 144 ( 0.00%) if !consume . || matches!( 192 ( 0.00%) typeck.expr_adjustments(e), 324 ( 0.00%) => ???:::expr_adjustments (9x) 296 ( 0.00%) [adjust, ..] if matches!(adjust.kind, Adjust::Borrow(_) | Adjust::Deref(_)) . ) . { 254 ( 0.00%) match e.kind { . ExprKind::Path(QPath::Resolved(None, p)) 54 ( 0.00%) if matches!(p.res, Res::Def(DefKind::Ctor(_, CtorKind::Const), _)) => . { . f(typeck.expr_ty(e))?; . }, . ExprKind::Path(_) . | ExprKind::Unary(UnOp::Deref, _) . | ExprKind::Index(..) . | ExprKind::Field(..) . | ExprKind::AddrOf(..) => (), . _ => f(typeck.expr_ty(e))?, . } . } 294 ( 0.00%) match e.kind { . ExprKind::AddrOf(_, _, e) 3 ( 0.00%) | ExprKind::Field(e, _) . | ExprKind::Unary(UnOp::Deref, e) . | ExprKind::Match(e, ..) 4 ( 0.00%) | ExprKind::Let(&LetExpr { init: e, .. }) => { 8 ( 0.00%) helper(typeck, false, e, f)?; . }, . ExprKind::Block(&Block { expr: Some(e), .. }, _) | ExprKind::Cast(e, _) | ExprKind::Unary(_, e) => { . helper(typeck, true, e, f)?; . }, 24 ( 0.00%) ExprKind::Call(callee, args) => { 41 ( 0.00%) helper(typeck, true, callee, f)?; 210 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_unconsumed_temporary::helper::<(), clippy_lints::methods::return_and_then::check::{closure#0}>'2 (3x) . for arg in args { 49 ( 0.00%) helper(typeck, true, arg, f)?; 507 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_unconsumed_temporary::helper::<(), clippy_lints::methods::return_and_then::check::{closure#0}>'2 (6x) . } . }, 33 ( 0.00%) ExprKind::MethodCall(_, receiver, args, _) => { 55 ( 0.00%) helper(typeck, true, receiver, f)?; 684 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_unconsumed_temporary::helper::<(), clippy_lints::methods::return_and_then::check::{closure#0}>'2 (6x) . for arg in args { 43 ( 0.00%) helper(typeck, true, arg, f)?; 140 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_unconsumed_temporary::helper::<(), clippy_lints::methods::return_and_then::check::{closure#0}>'2 (2x) . } . }, . ExprKind::Tup(args) | ExprKind::Array(args) => { . for arg in args { . helper(typeck, true, arg, f)?; . } . }, . ExprKind::Use(expr, _) => { -- line 730 ---------------------------------------- -- line 743 ---------------------------------------- . ExprKind::Struct(_, fields, default) => { . for field in fields { . helper(typeck, true, field.expr, f)?; . } . if let StructTailExpr::Base(default) = default { . helper(typeck, false, default, f)?; . } . }, 6 ( 0.00%) ExprKind::If(cond, then, else_expr) => { 8 ( 0.00%) helper(typeck, true, cond, f)?; 33,118 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_unconsumed_temporary::helper::<(), clippy_utils::leaks_droppable_temporary_with_limited_lifetime::{closure#0}>'2 (1x) 10 ( 0.00%) helper(typeck, true, then, f)?; 119,263 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_unconsumed_temporary::helper::<(), clippy_utils::leaks_droppable_temporary_with_limited_lifetime::{closure#0}>'2 (1x) 4 ( 0.00%) if let Some(else_expr) = else_expr { 10 ( 0.00%) helper(typeck, true, else_expr, f)?; 4,469 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_unconsumed_temporary::helper::<(), clippy_utils::leaks_droppable_temporary_with_limited_lifetime::{closure#0}>'2 (1x) . } . }, . ExprKind::Type(e, _) | ExprKind::UnsafeBinderCast(_, e, _) => { . helper(typeck, consume, e, f)?; . }, . . // Either drops temporaries, jumps out of the current expression, or has no sub expression. . ExprKind::DropTemps(_) -- line 763 ---------------------------------------- -- line 773 ---------------------------------------- . | ExprKind::Closure { .. } . | ExprKind::Path(_) . | ExprKind::Continue(_) . | ExprKind::InlineAsm(_) . | ExprKind::OffsetOf(..) . | ExprKind::Err(_) => (), . } . ControlFlow::Continue(()) 488 ( 0.00%) } 42 ( 0.00%) helper(cx.typeck_results(), true, e, &mut f) 1,445 ( 0.00%) => site/frontend/rust-clippy/clippy_utils/src/visitors.rs:clippy_utils::visitors::for_each_unconsumed_temporary::helper::<(), clippy_lints::methods::return_and_then::check::{closure#0}> (5x) . } . 2 ( 0.00%) pub fn any_temporaries_need_ordered_drop<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'tcx>) -> bool { 1 ( 0.00%) for_each_unconsumed_temporary(cx, e, |ty| { . if needs_ordered_drop(cx, ty) { . ControlFlow::Break(()) . } else { . ControlFlow::Continue(()) . } . }) . .is_break() 2 ( 0.00%) } . . /// Runs the given function for each path expression referencing the given local which occur after . /// the given expression. . pub fn for_each_local_assignment<'tcx, B>( . cx: &LateContext<'tcx>, . local_id: HirId, . f: impl FnMut(&'tcx Expr<'tcx>) -> ControlFlow, . ) -> ControlFlow { -- line 802 ---------------------------------------- 70,459 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/infallible_try_from.rs -------------------------------------------------------------------------------- Ir -- line 39 ---------------------------------------- . pub INFALLIBLE_TRY_FROM, . suspicious, . "TryFrom with infallible Error type" . } . . declare_lint_pass!(InfallibleTryFrom => [INFALLIBLE_TRY_FROM]); . . impl<'tcx> LateLintPass<'tcx> for InfallibleTryFrom { 20,576 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) { 6,234 ( 0.00%) let ItemKind::Impl(imp) = item.kind else { return }; 2,180 ( 0.00%) let Some(of_trait) = imp.of_trait else { return }; 2,523 ( 0.00%) let Some(trait_def_id) = of_trait.trait_ref.trait_def_id() else { 10,933 ( 0.00%) => ???:::trait_def_id (841x) . return; . }; 5,887 ( 0.00%) if !cx.tcx.is_diagnostic_item(sym::TryFrom, trait_def_id) { 82,848 ( 0.00%) => ???:::is_diagnostic_item (841x) . return; . } 228 ( 0.00%) for ii in cx . .tcx 24 ( 0.00%) .associated_items(item.owner_id.def_id) 120 ( 0.00%) .filter_by_name_unhygienic_and_kind(sym::Error, AssocTag::Type) 804 ( 0.00%) => ???:::filter_by_name_unhygienic_and_kind (12x) . { 36 ( 0.00%) let ii_ty = cx.tcx.type_of(ii.def_id).instantiate_identity().skip_norm_wip(); 96 ( 0.00%) if !ii_ty.is_inhabited_from( 7,156 ( 0.00%) => ???:::is_inhabited_from (12x) . cx.tcx, 84 ( 0.00%) cx.tcx.parent_module_from_def_id(ii.def_id.expect_local()), 1,496 ( 0.00%) => ???:::parent_module_from_def_id (12x) 36 ( 0.00%) cx.typing_env(), 252 ( 0.00%) => ???:::typing_env (12x) . ) { . let mut span = MultiSpan::from_span(cx.tcx.def_span(item.owner_id.to_def_id())); . let ii_ty_span = cx . .tcx . .hir_node_by_def_id(ii.def_id.expect_local()) . .expect_impl_item() . .expect_type() . .span; -- line 73 ---------------------------------------- -- line 75 ---------------------------------------- . span_lint( . cx, . INFALLIBLE_TRY_FROM, . span, . "infallible TryFrom impl; consider implementing From instead", . ); . } . } 20,576 ( 0.00%) } . } 2,784 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/returns/needless_return_with_question_mark.rs -------------------------------------------------------------------------------- Ir -- line 5 ---------------------------------------- . use rustc_hir::LangItem::ResultErr; . use rustc_hir::{Expr, ExprKind, HirId, MatchSource, Node, Stmt, StmtKind}; . use rustc_lint::{LateContext, LintContext as _}; . use rustc_middle::ty::adjustment::Adjust; . . use super::NEEDLESS_RETURN_WITH_QUESTION_MARK; . . pub(super) fn check_stmt<'tcx>(cx: &LateContext<'tcx>, stmt: &'tcx Stmt<'_>) { 13,958 ( 0.00%) if let StmtKind::Semi(expr) = stmt.kind 6,422 ( 0.00%) && let ExprKind::Ret(Some(ret)) = expr.kind . // return Err(...)? desugars to a match . // over a Err(...).branch() . // which breaks down to a branch call, with the callee being . // the constructor of the Err variant 884 ( 0.00%) && let ExprKind::Match(maybe_cons, _, MatchSource::TryDesugar(_)) = ret.kind . && let ExprKind::Call(_, [maybe_result_err]) = maybe_cons.kind . && let ExprKind::Call(maybe_constr, _) = maybe_result_err.kind . && maybe_constr.res(cx).ctor_parent(cx).is_lang_item(cx, ResultErr) . . // Ensure this is not the final stmt, otherwise removing it would cause a compile error . && let block = cx.tcx.hir_body_owned_by(cx.tcx.hir_enclosing_body_owner(expr.hir_id)).value . && let ExprKind::Block(block, _) = peel_async_body(block).kind . && !is_inside_let_else(cx.tcx, expr) -- line 27 ---------------------------------------- -- line 36 ---------------------------------------- . NEEDLESS_RETURN_WITH_QUESTION_MARK, . expr.span.until(ret.span), . "unneeded `return` statement with `?` operator", . "remove it", . String::new(), . Applicability::MachineApplicable, . ); . } 5,720 ( 0.00%) } . . /// In async functions, the body is wrapped in a . /// `Block { expr: DropTemps(inner) }`. We peel through to `inner` so . /// we can check the actual stmts. . /// Returns `body_value` unchanged for non-async functions. . fn peel_async_body<'a>(body_value: &'a Expr<'a>) -> &'a Expr<'a> { . if let ExprKind::Block(block, _) = body_value.kind . && let Some(expr) = block.expr -- line 52 ---------------------------------------- 35,252 ( 0.00%) -------------------------------------------------------------------------------- -- Auto-annotated source: site/frontend/rust-clippy/clippy_lints/src/upper_case_acronyms.rs -------------------------------------------------------------------------------- Ir -- line 65 ---------------------------------------- . } . } else { . count = 0; . } . } . count == 2 . } . 3,250 ( 0.00%) fn check_ident(cx: &LateContext<'_>, ident: &Ident, hir_id: HirId, be_aggressive: bool) { 750 ( 0.00%) let s = ident.as_str(); 8,000 ( 0.00%) => ???:::as_str (250x) . . // By default, only warn for upper case identifiers with at least 3 characters. 500 ( 0.00%) let replacement = if s.len() > 2 && s.bytes().all(|c| c.is_ascii_uppercase()) { . let mut r = String::with_capacity(s.len()); . let mut s = s.chars(); . r.push(s.next().unwrap()); . r.extend(s.map(|c| c.to_ascii_lowercase())); 18 ( 0.00%) r 488 ( 0.00%) } else if be_aggressive . // Only lint if the ident starts with an upper case character. . && let unprefixed = s.trim_start_matches('_') . && unprefixed.starts_with(|c: char| c.is_ascii_uppercase()) . && contains_acronym(unprefixed) . { . let mut r = String::with_capacity(s.len()); . let mut s = s.chars(); . let mut prev_upper = false; -- line 91 ---------------------------------------- -- line 102 ---------------------------------------- . } . r . } else { . return; . }; . . span_lint_hir_and_then( . cx, 12 ( 0.00%) UPPER_CASE_ACRONYMS, . hir_id, 12 ( 0.00%) ident.span, 18 ( 0.00%) format!("name `{ident}` contains a capitalized acronym"), 6 ( 0.00%) |diag| { . diag.span_suggestion( 6 ( 0.00%) ident.span, . "consider making the acronym lowercase, except the initial letter", . replacement, . Applicability::MaybeIncorrect, . ); . }, . ); 2,000 ( 0.00%) } . . impl LateLintPass<'_> for UpperCaseAcronyms { 25,720 ( 0.00%) fn check_item(&mut self, cx: &LateContext<'_>, it: &Item<'_>) { . // do not lint public items or in macros 7,716 ( 0.00%) if it.span.in_external_macro(cx.sess().source_map()) 13,741 ( 0.00%) || (self.avoid_breaking_exported_api && cx.effective_visibilities.is_exported(it.owner_id.def_id)) 102,396 ( 0.00%) => ???:::is_exported (1,963x) . { . return; . } 6,560 ( 0.00%) match it.kind { 596 ( 0.00%) ItemKind::TyAlias(ident, ..) | ItemKind::Struct(ident, ..) | ItemKind::Trait { ident, .. } => { 745 ( 0.00%) check_ident(cx, &ident, it.hir_id(), self.upper_case_acronyms_aggressive); 222,488 ( 0.01%) => site/frontend/rust-clippy/clippy_lints/src/upper_case_acronyms.rs:clippy_lints::upper_case_acronyms::check_ident (149x) . }, 76 ( 0.00%) ItemKind::Enum(ident, _, ref enumdef) => { 114 ( 0.00%) check_ident(cx, &ident, it.hir_id(), self.upper_case_acronyms_aggressive); 1,397 ( 0.00%) => site/frontend/rust-clippy/clippy_lints/src/upper_case_acronyms.rs:clippy_lints::upper_case_acronyms::check_ident (19x) . // 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 19 ( 0.00%) enumdef.variants.iter().for_each(|variant| { 492 ( 0.00%) check_ident(cx, &variant.ident, variant.hir_id, self.upper_case_acronyms_aggressive); 1,072,843 ( 0.03%) => site/frontend/rust-clippy/clippy_lints/src/upper_case_acronyms.rs:clippy_lints::upper_case_acronyms::check_ident (82x) . }); . }, . _ => {}, . } 20,576 ( 0.00%) } . } 192 ( 0.00%) -------------------------------------------------------------------------------- The following files chosen for auto-annotation could not be found: -------------------------------------------------------------------------------- /rust/deps/hashbrown-0.17.0/src/control/bitmask.rs /rust/deps/hashbrown-0.17.0/src/control/tag.rs /rust/deps/hashbrown-0.17.0/src/raw.rs /rust/deps/hashbrown-0.17.0/src/table.rs /rust/deps/hashbrown-0.17.1/src/control/bitmask.rs /rust/deps/hashbrown-0.17.1/src/control/tag.rs /rust/deps/hashbrown-0.17.1/src/map.rs /rust/deps/hashbrown-0.17.1/src/raw.rs /rust/deps/hashbrown-0.17.1/src/set.rs /rust/deps/indexmap-2.14.0/src/inner.rs /rust/deps/indexmap-2.14.0/src/inner/entry.rs /rust/deps/indexmap-2.14.0/src/map.rs /rust/deps/indexmap-2.14.0/src/map/entry.rs /rust/deps/pulldown-cmark-0.11.3/src/lib.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/large.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/ehooks.h include/jemalloc/internal/emap.h include/jemalloc/internal/extent.h include/jemalloc/internal/fb.h include/jemalloc/internal/jemalloc_internal_inlines_a.h include/jemalloc/internal/jemalloc_internal_inlines_b.h include/jemalloc/internal/jemalloc_internal_inlines_c.h include/jemalloc/internal/mutex.h include/jemalloc/internal/pai.h include/jemalloc/internal/ph.h include/jemalloc/internal/rtree.h include/jemalloc/internal/san.h include/jemalloc/internal/sz.h include/jemalloc/internal/tcache_inlines.h include/jemalloc/internal/thread_event.h include/jemalloc/internal/ticker.h include/jemalloc/internal/tsd.h include/jemalloc/internal/tsd_tls.h include/jemalloc/internal/util.h src/arena.c src/base.c src/bitmap.c src/decay.c src/emap.c src/eset.c src/extent.c src/extent_dss.c src/hook.c src/pa.c src/pac.c src/sz.c src/tcache.c src/thread_event.c -------------------------------------------------------------------------------- Ir -------------------------------------------------------------------------------- 503,078,584 (13.85%) events annotated