authorbors <bors@rust-lang.org> 2026-06-28 19:23:00 UTC
committerbors <bors@rust-lang.org> 2026-06-28 19:23:00 UTC
logdf6ee909ef35c75aa58aa45af6ac071a9b8285c2
tree8652651132ebd54baa3b015b27ca09362a928e4f
parent2574810b228d53518cc2a13f2ee473195932a999
parent6b1bbf97e8781080c7e6780899a1d98b5d3affb2

Auto merge of #158529 - JonathanBrouwer:rollup-rnUjpna, r=JonathanBrouwer

Rollup of 2 pull requests Successful merges: - rust-lang/rust#156419 (Update itertools to 0.15) - rust-lang/rust#146561 (Change `Location<'_>` lifetime to `'static` in `Panic[Hook]Info`)

23 files changed, 66 insertions(+), 57 deletions(-)

Cargo.lock+31-22
......@@ -687,7 +687,7 @@ dependencies = [
687687 "color-print",
688688 "declare_clippy_lint",
689689 "filetime",
690 "itertools",
690 "itertools 0.12.1",
691691 "pulldown-cmark",
692692 "regex",
693693 "rustc_tools_util 0.4.2",
......@@ -705,7 +705,7 @@ name = "clippy_config"
705705version = "0.1.98"
706706dependencies = [
707707 "clippy_utils",
708 "itertools",
708 "itertools 0.12.1",
709709 "serde",
710710 "toml 0.7.8",
711711 "walkdir",
......@@ -718,7 +718,7 @@ dependencies = [
718718 "chrono",
719719 "clap",
720720 "indoc",
721 "itertools",
721 "itertools 0.12.1",
722722 "opener",
723723 "rustc-literal-escaper",
724724 "walkdir",
......@@ -733,7 +733,7 @@ dependencies = [
733733 "clippy_config",
734734 "clippy_utils",
735735 "declare_clippy_lint",
736 "itertools",
736 "itertools 0.12.1",
737737 "quine-mc_cluskey",
738738 "regex-syntax",
739739 "semver",
......@@ -751,7 +751,7 @@ version = "0.0.1"
751751dependencies = [
752752 "clippy_config",
753753 "clippy_utils",
754 "itertools",
754 "itertools 0.12.1",
755755 "regex",
756756 "rustc-semver",
757757]
......@@ -761,7 +761,7 @@ name = "clippy_utils"
761761version = "0.1.98"
762762dependencies = [
763763 "arrayvec",
764 "itertools",
764 "itertools 0.12.1",
765765 "rustc_apfloat",
766766 "serde",
767767]
......@@ -933,7 +933,7 @@ name = "coverage-dump"
933933version = "0.1.0"
934934dependencies = [
935935 "anyhow",
936 "itertools",
936 "itertools 0.15.0",
937937 "leb128",
938938 "md-5",
939939 "miniz_oxide",
......@@ -2129,6 +2129,15 @@ dependencies = [
21292129 "either",
21302130]
21312131
2132[[package]]
2133name = "itertools"
2134version = "0.15.0"
2135source = "registry+https://github.com/rust-lang/crates.io-index"
2136checksum = "8b4baf93f58d4425749ca49a51c50ebab072c5df6994d08fed93541c331481dc"
2137dependencies = [
2138 "either",
2139]
2140
21322141[[package]]
21332142name = "itoa"
21342143version = "1.0.15"
......@@ -3686,7 +3695,7 @@ dependencies = [
36863695name = "rustc_ast_passes"
36873696version = "0.0.0"
36883697dependencies = [
3689 "itertools",
3698 "itertools 0.15.0",
36903699 "rustc_abi",
36913700 "rustc_ast",
36923701 "rustc_ast_pretty",
......@@ -3706,7 +3715,7 @@ dependencies = [
37063715name = "rustc_ast_pretty"
37073716version = "0.0.0"
37083717dependencies = [
3709 "itertools",
3718 "itertools 0.15.0",
37103719 "rustc_ast",
37113720 "rustc_lexer",
37123721 "rustc_span",
......@@ -3750,7 +3759,7 @@ name = "rustc_borrowck"
37503759version = "0.0.0"
37513760dependencies = [
37523761 "either",
3753 "itertools",
3762 "itertools 0.15.0",
37543763 "polonius-engine",
37553764 "rustc_abi",
37563765 "rustc_data_structures",
......@@ -3804,7 +3813,7 @@ version = "0.0.0"
38043813dependencies = [
38053814 "bitflags",
38063815 "gimli 0.31.1",
3807 "itertools",
3816 "itertools 0.15.0",
38083817 "libc",
38093818 "libloading 0.9.0",
38103819 "measureme",
......@@ -3840,7 +3849,7 @@ dependencies = [
38403849 "bitflags",
38413850 "bstr",
38423851 "find-msvc-tools",
3843 "itertools",
3852 "itertools 0.15.0",
38443853 "libc",
38453854 "object 0.37.3",
38463855 "pathdiff",
......@@ -4110,7 +4119,7 @@ dependencies = [
41104119name = "rustc_hir_analysis"
41114120version = "0.0.0"
41124121dependencies = [
4113 "itertools",
4122 "itertools 0.15.0",
41144123 "rustc_abi",
41154124 "rustc_arena",
41164125 "rustc_ast",
......@@ -4157,7 +4166,7 @@ dependencies = [
41574166name = "rustc_hir_typeck"
41584167version = "0.0.0"
41594168dependencies = [
4160 "itertools",
4169 "itertools 0.15.0",
41614170 "rustc_abi",
41624171 "rustc_ast",
41634172 "rustc_data_structures",
......@@ -4436,7 +4445,7 @@ dependencies = [
44364445name = "rustc_mir_build"
44374446version = "0.0.0"
44384447dependencies = [
4439 "itertools",
4448 "itertools 0.15.0",
44404449 "rustc_abi",
44414450 "rustc_apfloat",
44424451 "rustc_arena",
......@@ -4480,7 +4489,7 @@ name = "rustc_mir_transform"
44804489version = "0.0.0"
44814490dependencies = [
44824491 "either",
4483 "itertools",
4492 "itertools 0.15.0",
44844493 "rustc_abi",
44854494 "rustc_arena",
44864495 "rustc_ast",
......@@ -4685,7 +4694,7 @@ name = "rustc_resolve"
46854694version = "0.0.0"
46864695dependencies = [
46874696 "indexmap",
4688 "itertools",
4697 "itertools 0.15.0",
46894698 "pulldown-cmark",
46904699 "rustc_arena",
46914700 "rustc_ast",
......@@ -4847,7 +4856,7 @@ checksum = "a3b75158011a63889ba12084cf1224baad7bcad50f6ee7c842f772b74aa148ed"
48474856name = "rustc_trait_selection"
48484857version = "0.0.0"
48494858dependencies = [
4850 "itertools",
4859 "itertools 0.15.0",
48514860 "rustc_abi",
48524861 "rustc_ast",
48534862 "rustc_data_structures",
......@@ -4881,7 +4890,7 @@ dependencies = [
48814890name = "rustc_transmute"
48824891version = "0.0.0"
48834892dependencies = [
4884 "itertools",
4893 "itertools 0.15.0",
48854894 "rustc_abi",
48864895 "rustc_data_structures",
48874896 "rustc_hir",
......@@ -4895,7 +4904,7 @@ dependencies = [
48954904name = "rustc_ty_utils"
48964905version = "0.0.0"
48974906dependencies = [
4898 "itertools",
4907 "itertools 0.15.0",
48994908 "rustc_abi",
49004909 "rustc_data_structures",
49014910 "rustc_errors",
......@@ -4972,7 +4981,7 @@ dependencies = [
49724981 "base64",
49734982 "expect-test",
49744983 "indexmap",
4975 "itertools",
4984 "itertools 0.15.0",
49764985 "minifier",
49774986 "proc-macro2",
49784987 "pulldown-cmark-escape",
......@@ -5060,7 +5069,7 @@ dependencies = [
50605069 "dirs",
50615070 "getopts",
50625071 "ignore",
5063 "itertools",
5072 "itertools 0.12.1",
50645073 "regex",
50655074 "rustfmt-config_proc_macro",
50665075 "semver",
compiler/rustc_ast_passes/Cargo.toml+1-1
......@@ -5,7 +5,7 @@ edition = "2024"
55
66[dependencies]
77# tidy-alphabetical-start
8itertools = "0.12"
8itertools = "0.15"
99rustc_abi = { path = "../rustc_abi" }
1010rustc_ast = { path = "../rustc_ast" }
1111rustc_ast_pretty = { path = "../rustc_ast_pretty" }
compiler/rustc_ast_pretty/Cargo.toml+1-1
......@@ -5,7 +5,7 @@ edition = "2024"
55
66[dependencies]
77# tidy-alphabetical-start
8itertools = "0.12"
8itertools = "0.15"
99rustc_ast = { path = "../rustc_ast" }
1010rustc_lexer = { path = "../rustc_lexer" }
1111rustc_span = { path = "../rustc_span" }
compiler/rustc_ast_pretty/src/pprust/state/expr.rs+3-3
......@@ -1,7 +1,7 @@
11use std::fmt::Write;
22
33use ast::{ForLoopKind, MatchKind};
4use itertools::{Itertools, Position};
4use itertools::Itertools;
55use rustc_ast::util::classify;
66use rustc_ast::util::literal::escape_byte_str_symbol;
77use rustc_ast::util::parser::{self, ExprPrecedence, Fixity};
......@@ -170,8 +170,8 @@ impl<'a> State<'a> {
170170 }
171171 let cb = self.cbox(0);
172172 for (pos, field) in fields.iter().with_position() {
173 let is_first = matches!(pos, Position::First | Position::Only);
174 let is_last = matches!(pos, Position::Last | Position::Only);
173 let is_first = pos.is_first();
174 let is_last = pos.is_last();
175175 self.maybe_print_comment(field.span.hi());
176176 self.print_outer_attributes(&field.attrs);
177177 if is_first {
compiler/rustc_ast_pretty/src/pprust/state/item.rs+2-2
......@@ -1,5 +1,5 @@
11use ast::StaticItem;
2use itertools::{Itertools, Position};
2use itertools::Itertools;
33use rustc_ast::{self as ast, EiiImpl, ModKind, Safety, TraitAlias};
44use rustc_span::Ident;
55
......@@ -923,7 +923,7 @@ impl<'a> State<'a> {
923923 self.zerobreak();
924924 let ib = self.ibox(0);
925925 for (pos, use_tree) in items.iter().with_position() {
926 let is_last = matches!(pos, Position::Last | Position::Only);
926 let is_last = pos.is_last();
927927 self.print_use_tree(&use_tree.0);
928928 if !is_last {
929929 self.word(",");
compiler/rustc_borrowck/Cargo.toml+1-1
......@@ -6,7 +6,7 @@ edition = "2024"
66[dependencies]
77# tidy-alphabetical-start
88either = "1.5.0"
9itertools = "0.12"
9itertools = "0.15"
1010polonius-engine = "0.13.0"
1111rustc_abi = { path = "../rustc_abi" }
1212rustc_data_structures = { path = "../rustc_data_structures" }
compiler/rustc_codegen_llvm/Cargo.toml+1-1
......@@ -12,7 +12,7 @@ bitflags = "2.4.1"
1212# To avoid duplicate dependencies, this should match the version of gimli used
1313# by `rustc_codegen_ssa` via its `thorin-dwp` dependency.
1414gimli = "0.31"
15itertools = "0.12"
15itertools = "0.15"
1616libc = "0.2"
1717libloading = { version = "0.9.0" }
1818measureme = "12.0.1"
compiler/rustc_codegen_ssa/Cargo.toml+1-1
......@@ -9,7 +9,7 @@ ar_archive_writer = "0.5"
99bitflags = "2.4.1"
1010bstr = "1.11.3"
1111find-msvc-tools = "0.1.2"
12itertools = "0.12"
12itertools = "0.15"
1313pathdiff = "0.2.0"
1414regex = "1.4"
1515rustc_abi = { path = "../rustc_abi" }
compiler/rustc_hir_analysis/Cargo.toml+1-1
......@@ -9,7 +9,7 @@ doctest = false
99
1010[dependencies]
1111# tidy-alphabetical-start
12itertools = "0.12"
12itertools = "0.15"
1313rustc_abi = { path = "../rustc_abi" }
1414rustc_arena = { path = "../rustc_arena" }
1515rustc_ast = { path = "../rustc_ast" }
compiler/rustc_hir_typeck/Cargo.toml+1-1
......@@ -5,7 +5,7 @@ edition = "2024"
55
66[dependencies]
77# tidy-alphabetical-start
8itertools = "0.12"
8itertools = "0.15"
99rustc_abi = { path = "../rustc_abi" }
1010rustc_ast = { path = "../rustc_ast" }
1111rustc_data_structures = { path = "../rustc_data_structures" }
compiler/rustc_mir_build/Cargo.toml+1-1
......@@ -5,7 +5,7 @@ edition = "2024"
55
66[dependencies]
77# tidy-alphabetical-start
8itertools = "0.12"
8itertools = "0.15"
99rustc_abi = { path = "../rustc_abi" }
1010rustc_apfloat = "0.2.0"
1111rustc_arena = { path = "../rustc_arena" }
compiler/rustc_mir_build/src/builder/matches/mod.rs+3-3
......@@ -9,7 +9,7 @@ use std::borrow::Borrow;
99use std::sync::Arc;
1010use std::{debug_assert_matches, mem};
1111
12use itertools::{Itertools, Position};
12use itertools::Itertools;
1313use rustc_abi::{FIRST_VARIANT, FieldIdx, VariantIdx};
1414use rustc_data_structures::fx::FxIndexMap;
1515use rustc_data_structures::stack::ensure_sufficient_stack;
......@@ -551,9 +551,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
551551 // the drop order for the first sub-branch, we lower sub-branches in reverse (#142163).
552552 let target_block = self.cfg.start_new_block();
553553 for (pos, sub_branch) in branch.sub_branches.into_iter().rev().with_position() {
554 debug_assert!(pos != Position::Only);
554 debug_assert!(!pos.is_exactly_one());
555555 let schedule_drops =
556 if pos == Position::Last { ScheduleDrops::Yes } else { ScheduleDrops::No };
556 if pos.is_last() { ScheduleDrops::Yes } else { ScheduleDrops::No };
557557 let binding_end = self.bind_and_guard_matched_candidate(
558558 sub_branch,
559559 fake_borrow_temps,
compiler/rustc_mir_transform/Cargo.toml+1-1
......@@ -6,7 +6,7 @@ edition = "2024"
66[dependencies]
77# tidy-alphabetical-start
88either = "1"
9itertools = "0.12"
9itertools = "0.15"
1010rustc_abi = { path = "../rustc_abi" }
1111rustc_arena = { path = "../rustc_arena" }
1212rustc_ast = { path = "../rustc_ast" }
compiler/rustc_resolve/Cargo.toml+1-1
......@@ -6,7 +6,7 @@ edition = "2024"
66[dependencies]
77# tidy-alphabetical-start
88indexmap = "2.4.0"
9itertools = "0.12"
9itertools = "0.15"
1010pulldown-cmark = { version = "0.11", features = [
1111 "html",
1212], default-features = false }
compiler/rustc_trait_selection/Cargo.toml+1-1
......@@ -5,7 +5,7 @@ edition = "2024"
55
66[dependencies]
77# tidy-alphabetical-start
8itertools = "0.12"
8itertools = "0.15"
99rustc_abi = { path = "../rustc_abi" }
1010rustc_ast = { path = "../rustc_ast" }
1111rustc_data_structures = { path = "../rustc_data_structures" }
compiler/rustc_transmute/Cargo.toml+1-1
......@@ -16,7 +16,7 @@ tracing = "0.1"
1616
1717[dev-dependencies]
1818# tidy-alphabetical-start
19itertools = "0.12"
19itertools = "0.15"
2020# tidy-alphabetical-end
2121
2222[features]
compiler/rustc_ty_utils/Cargo.toml+1-1
......@@ -5,7 +5,7 @@ edition = "2024"
55
66[dependencies]
77# tidy-alphabetical-start
8itertools = "0.12"
8itertools = "0.15"
99rustc_abi = { path = "../rustc_abi" }
1010rustc_data_structures = { path = "../rustc_data_structures" }
1111rustc_errors = { path = "../rustc_errors" }
library/core/src/panic/panic_info.rs+4-4
......@@ -13,7 +13,7 @@ use crate::panic::Location;
1313#[derive(Debug)]
1414pub struct PanicInfo<'a> {
1515 message: &'a fmt::Arguments<'a>,
16 location: &'a Location<'a>,
16 location: &'static Location<'static>,
1717 can_unwind: bool,
1818 force_no_backtrace: bool,
1919}
......@@ -33,7 +33,7 @@ impl<'a> PanicInfo<'a> {
3333 #[inline]
3434 pub(crate) fn new(
3535 message: &'a fmt::Arguments<'a>,
36 location: &'a Location<'a>,
36 location: &'static Location<'static>,
3737 can_unwind: bool,
3838 force_no_backtrace: bool,
3939 ) -> Self {
......@@ -88,10 +88,10 @@ impl<'a> PanicInfo<'a> {
8888 /// ```
8989 #[must_use]
9090 #[stable(feature = "panic_hooks", since = "1.10.0")]
91 pub fn location(&self) -> Option<&Location<'_>> {
91 pub fn location(&self) -> Option<&'static Location<'static>> {
9292 // NOTE: If this is changed to sometimes return None,
9393 // deal with that case in std::panicking::default_hook and core::panicking::panic_fmt.
94 Some(&self.location)
94 Some(self.location)
9595 }
9696
9797 /// Returns the payload associated with the panic.
library/std/src/panic.rs+4-4
......@@ -41,7 +41,7 @@ pub type PanicInfo<'a> = PanicHookInfo<'a>;
4141#[derive(Debug)]
4242pub struct PanicHookInfo<'a> {
4343 payload: &'a (dyn Any + Send),
44 location: &'a Location<'a>,
44 location: &'static Location<'static>,
4545 can_unwind: bool,
4646 force_no_backtrace: bool,
4747}
......@@ -49,7 +49,7 @@ pub struct PanicHookInfo<'a> {
4949impl<'a> PanicHookInfo<'a> {
5050 #[inline]
5151 pub(crate) fn new(
52 location: &'a Location<'a>,
52 location: &'static Location<'static>,
5353 payload: &'a (dyn Any + Send),
5454 can_unwind: bool,
5555 force_no_backtrace: bool,
......@@ -160,10 +160,10 @@ impl<'a> PanicHookInfo<'a> {
160160 #[must_use]
161161 #[inline]
162162 #[stable(feature = "panic_hooks", since = "1.10.0")]
163 pub fn location(&self) -> Option<&Location<'_>> {
163 pub fn location(&self) -> Option<&'static Location<'static>> {
164164 // NOTE: If this is changed to sometimes return None,
165165 // deal with that case in std::panicking::default_hook and core::panicking::panic_fmt.
166 Some(&self.location)
166 Some(self.location)
167167 }
168168
169169 /// Returns whether the panic handler is allowed to unwind the stack from
library/std/src/panicking.rs+1-1
......@@ -776,7 +776,7 @@ fn payload_as_str(payload: &dyn Any) -> &str {
776776#[optimize(size)]
777777fn panic_with_hook(
778778 payload: &mut dyn PanicPayload,
779 location: &Location<'_>,
779 location: &'static Location<'static>,
780780 can_unwind: bool,
781781 force_no_backtrace: bool,
782782) -> ! {
src/librustdoc/Cargo.toml+1-1
......@@ -13,7 +13,7 @@ arrayvec = { version = "0.7", default-features = false }
1313askama = { version = "0.16.0", default-features = false, features = ["alloc", "config", "derive"] }
1414base64 = "0.21.7"
1515indexmap = { version = "2", features = ["serde"] }
16itertools = "0.12"
16itertools = "0.15"
1717minifier = { version = "0.3.5", default-features = false }
1818proc-macro2 = "1.0.103"
1919pulldown-cmark-escape = { version = "0.11.0", features = ["simd"] }
src/librustdoc/html/render/sorted_template.rs+3-3
......@@ -3,7 +3,7 @@ use std::fmt::{self, Write as _};
33use std::marker::PhantomData;
44use std::str::FromStr;
55
6use itertools::{Itertools as _, Position};
6use itertools::Itertools as _;
77use serde::{Deserialize, Serialize};
88
99/// Append-only templates for sorted, deduplicated lists of items.
......@@ -62,7 +62,7 @@ impl<F: FileFormat> fmt::Display for SortedTemplate<F> {
6262 write!(f, "{}", self.before)?;
6363 for (p, fragment) in self.fragments.iter().with_position() {
6464 let mut f = DeltaWriter { inner: &mut f, delta: 0 };
65 let sep = if matches!(p, Position::First | Position::Only) { "" } else { F::SEPARATOR };
65 let sep = if p.is_first() { "" } else { F::SEPARATOR };
6666 f.write_str(sep)?;
6767 f.write_str(fragment)?;
6868 fragment_lengths.push(f.delta);
......@@ -95,7 +95,7 @@ impl<F: FileFormat> FromStr for SortedTemplate<F> {
9595 let (fragment, rest) =
9696 s.split_at_checked(index).ok_or(Error("invalid fragment length: out of bounds"))?;
9797 s = rest;
98 let sep = if matches!(p, Position::First | Position::Only) { "" } else { F::SEPARATOR };
98 let sep = if p.is_first() { "" } else { F::SEPARATOR };
9999 let fragment = fragment
100100 .strip_prefix(sep)
101101 .ok_or(Error("invalid fragment length: expected to find separator here"))?;
src/tools/coverage-dump/Cargo.toml+1-1
......@@ -7,7 +7,7 @@ edition = "2021"
77
88[dependencies]
99anyhow = "1.0.71"
10itertools = "0.12"
10itertools = "0.15"
1111leb128 = "0.2.5"
1212md5 = { package = "md-5" , version = "0.10.5" }
1313miniz_oxide = "0.8.8"