diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-02-22 11:36:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-22 11:36:43 +0100 |
| commit | 37e0d138cffd8d3b3d9b9da75f2645e1ba87dacb (patch) | |
| tree | 6f97e46c6a8311c20bfa4a063ab9708e6d2ff3c5 /compiler/rustc_data_structures/src | |
| parent | 72535fec55b0c9faf9859096b513041edeebe48f (diff) | |
| parent | 3d5438accdd111b4e507bbfae5e2df6062fb5689 (diff) | |
| download | rust-37e0d138cffd8d3b3d9b9da75f2645e1ba87dacb.tar.gz rust-37e0d138cffd8d3b3d9b9da75f2645e1ba87dacb.zip | |
Rollup merge of #137333 - compiler-errors:edition-2024-fresh, r=Nadrieril
Use `edition = "2024"` in the compiler (redux) Most of this is binding mode changes, which I fixed by running `x.py fix`. Also adds some miscellaneous `unsafe` blocks for new unsafe standard library functions (the setenv ones), and a missing `unsafe extern` block in some enzyme codegen code, and fixes some precise capturing lifetime changes (but only when they led to errors). cc ``@ehuss`` ``@traviscross``
Diffstat (limited to 'compiler/rustc_data_structures/src')
| -rw-r--r-- | compiler/rustc_data_structures/src/graph/scc/mod.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_data_structures/src/sorted_map/tests.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_data_structures/src/graph/scc/mod.rs b/compiler/rustc_data_structures/src/graph/scc/mod.rs index 93f6192b10b..2241b538738 100644 --- a/compiler/rustc_data_structures/src/graph/scc/mod.rs +++ b/compiler/rustc_data_structures/src/graph/scc/mod.rs @@ -133,7 +133,7 @@ impl<N: Idx, S: Idx + Ord, A: Annotation> Sccs<N, S, A> { /// meaning that if `S1 -> S2`, we will visit `S2` first and `S1` after. /// This is convenient when the edges represent dependencies: when you visit /// `S1`, the value for `S2` will already have been computed. - pub fn all_sccs(&self) -> impl Iterator<Item = S> { + pub fn all_sccs(&self) -> impl Iterator<Item = S> + use<N, S, A> { (0..self.scc_data.len()).map(S::new) } diff --git a/compiler/rustc_data_structures/src/sorted_map/tests.rs b/compiler/rustc_data_structures/src/sorted_map/tests.rs index def7a7112fb..ea4d2f1feac 100644 --- a/compiler/rustc_data_structures/src/sorted_map/tests.rs +++ b/compiler/rustc_data_structures/src/sorted_map/tests.rs @@ -24,7 +24,7 @@ fn test_sorted_index_multi_map() { // `get_by_key` returns items in insertion order. let twos: Vec<_> = set.get_by_key_enumerated(2).collect(); let idxs: Vec<usize> = twos.iter().map(|(i, _)| *i).collect(); - let values: Vec<usize> = twos.iter().map(|(_, &v)| v).collect(); + let values: Vec<usize> = twos.iter().map(|&(_, &v)| v).collect(); assert_eq!(idxs, vec![0, 2, 4]); assert_eq!(values, vec![0, 1, 2]); |
