Skip to content

Commit 74052cc

Browse files
committed
Auto merge of #158095 - JonathanBrouwer:rollup-svEIj18, r=JonathanBrouwer
Rollup of 10 pull requests Successful merges: - #158026 (`RegionValues`: disable unnecessary range check) - #156795 (Handle generic reborrow in expression-use adjustment walking) - #157694 (Enhance documentation on wake call memory ordering) - #157935 (Make `proc_macro::ConversionErrorKind` non exhaustive) - #158002 (Replace `unwrap` with `expect` in `get_module_children`) - #158034 (Fix reborrow source expression visits) - #158072 (Bump thin-vec to 0.2.18 to address RUSTSEC-2026-0103) - #158074 (Document transient connection errors from TcpListener::accept) - #158077 (rustdoc-json-types: Replace bincode dev-dependency with postcard) - #158086 (renovate: Loosen dashboard approval and adopt recommended config)
2 parents c55fad5 + 364f0a5 commit 74052cc

34 files changed

Lines changed: 277 additions & 68 deletions

File tree

.github/renovate.json5

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": [
4+
"config:recommended",
5+
// Open a PR to migrate the config when Renovate deprecates syntax
6+
":configMigration",
7+
// Refresh lock files on the first day of each month
8+
// (still gated by dashboard approval for now)
9+
":maintainLockFilesMonthly",
410
// Pin GitHub Actions to their commit SHA digests, resolving floating tags
511
// (e.g. `v4`) to the full SemVer version (e.g. `v4.1.2`)
612
"helpers:pinGitHubActionDigestsToSemver"
713
],
8-
// Let Renovatebot keep an opened issue that tracks our dependencies
9-
"dependencyDashboard": true,
1014
// Require manual approval from the Dependency Dashboard before opening PRs
1115
"dependencyDashboardApproval": true,
16+
"packageRules": [
17+
{
18+
// No dashboard approval necessary for GitHub Actions updates
19+
"matchManagers": ["github-actions"],
20+
"dependencyDashboardApproval": false
21+
}
22+
],
1223
// Don't manage dependencies inside subtrees. They are updated upstream and
1324
// synced in. See `src/doc/rustc-dev-guide/src/external-repos.md` for the list.
1425
"ignorePaths": [

Cargo.lock

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,15 @@ dependencies = [
784784
"cc",
785785
]
786786

787+
[[package]]
788+
name = "cobs"
789+
version = "0.3.0"
790+
source = "registry+https://github.com/rust-lang/crates.io-index"
791+
checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1"
792+
dependencies = [
793+
"thiserror 2.0.17",
794+
]
795+
787796
[[package]]
788797
name = "codespan-reporting"
789798
version = "0.13.1"
@@ -1330,6 +1339,18 @@ dependencies = [
13301339
"stable_deref_trait",
13311340
]
13321341

1342+
[[package]]
1343+
name = "embedded-io"
1344+
version = "0.4.0"
1345+
source = "registry+https://github.com/rust-lang/crates.io-index"
1346+
checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced"
1347+
1348+
[[package]]
1349+
name = "embedded-io"
1350+
version = "0.6.1"
1351+
source = "registry+https://github.com/rust-lang/crates.io-index"
1352+
checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d"
1353+
13331354
[[package]]
13341355
name = "ena"
13351356
version = "0.14.3"
@@ -3055,6 +3076,18 @@ dependencies = [
30553076
"portable-atomic",
30563077
]
30573078

3079+
[[package]]
3080+
name = "postcard"
3081+
version = "1.1.3"
3082+
source = "registry+https://github.com/rust-lang/crates.io-index"
3083+
checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24"
3084+
dependencies = [
3085+
"cobs",
3086+
"embedded-io 0.4.0",
3087+
"embedded-io 0.6.1",
3088+
"serde",
3089+
]
3090+
30583091
[[package]]
30593092
name = "potential_utf"
30603093
version = "0.1.4"
@@ -4978,7 +5011,7 @@ dependencies = [
49785011
name = "rustdoc-json-types"
49795012
version = "0.1.0"
49805013
dependencies = [
4981-
"bincode",
5014+
"postcard",
49825015
"rkyv",
49835016
"rustc-hash 2.1.1",
49845017
"serde",
@@ -5554,9 +5587,9 @@ dependencies = [
55545587

55555588
[[package]]
55565589
name = "thin-vec"
5557-
version = "0.2.15"
5590+
version = "0.2.18"
55585591
source = "registry+https://github.com/rust-lang/crates.io-index"
5559-
checksum = "da322882471314edc77fa5232c587bcb87c9df52bfd0d7d4826f8868ead61899"
5592+
checksum = "b0f7e269b48f0a7dd0146680fa24b50cc67fc0373f086a5b2f99bd084639b482"
55605593

55615594
[[package]]
55625595
name = "thiserror"

compiler/rustc_ast/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ rustc_macros = { path = "../rustc_macros" }
1515
rustc_serialize = { path = "../rustc_serialize" }
1616
rustc_span = { path = "../rustc_span" }
1717
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
18-
thin-vec = "0.2.15"
18+
thin-vec = "0.2.18"
1919
tracing = "0.1"
2020
# tidy-alphabetical-end

compiler/rustc_ast_lowering/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ rustc_session = { path = "../rustc_session" }
2222
rustc_span = { path = "../rustc_span" }
2323
rustc_target = { path = "../rustc_target" }
2424
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
25-
thin-vec = "0.2.15"
25+
thin-vec = "0.2.18"
2626
tracing = "0.1"
2727
# tidy-alphabetical-end

compiler/rustc_ast_passes/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ rustc_macros = { path = "../rustc_macros" }
1818
rustc_session = { path = "../rustc_session" }
1919
rustc_span = { path = "../rustc_span" }
2020
rustc_target = { path = "../rustc_target" }
21-
thin-vec = "0.2.15"
21+
thin-vec = "0.2.18"
2222
# tidy-alphabetical-end

compiler/rustc_ast_pretty/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ rustc_span = { path = "../rustc_span" }
1313

1414
[dev-dependencies]
1515
# tidy-alphabetical-start
16-
thin-vec = "0.2.15"
16+
thin-vec = "0.2.18"
1717
# tidy-alphabetical-end

compiler/rustc_attr_parsing/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ rustc_parse_format = { path = "../rustc_parse_format" }
2020
rustc_session = { path = "../rustc_session" }
2121
rustc_span = { path = "../rustc_span" }
2222
rustc_target = { path = "../rustc_target" }
23-
thin-vec = "0.2.15"
23+
thin-vec = "0.2.18"
2424
# tidy-alphabetical-end

compiler/rustc_borrowck/src/region_infer/values.rs

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_middle::bug;
99
use rustc_middle::mir::{BasicBlock, Location};
1010
use rustc_middle::ty::{self, RegionVid};
1111
use rustc_mir_dataflow::points::{DenseLocationMap, PointIndex};
12-
use tracing::debug;
12+
use tracing::{debug, instrument};
1313

1414
use crate::BorrowIndex;
1515
use crate::polonius::LiveLoans;
@@ -116,37 +116,43 @@ impl LivenessValues {
116116
/// Records `region` as being live at the given `location`.
117117
pub(crate) fn add_location(&mut self, region: RegionVid, location: Location) {
118118
let point = self.location_map.point_from_location(location);
119+
// This is a debug assert despite being cheap because it drops
120+
// the current `point_in_range()` uses to 0 when debugging is off.
121+
debug_assert!(
122+
self.location_map.point_in_range(point),
123+
"Tried inserting region {region:?} whose location {location:?} does not belong to this body!"
124+
);
119125
debug!("LivenessValues::add_location(region={:?}, location={:?})", region, location);
120126
match &mut self.live_regions {
121127
LiveRegions::AtPoints(points) => {
122128
points.insert(region, point);
123129
}
124130

125-
LiveRegions::InBody(live_regions) if self.location_map.point_in_range(point) => {
131+
LiveRegions::InBody(live_regions) => {
126132
live_regions.insert(region);
127133
}
128-
129-
LiveRegions::InBody(_) => (),
130134
};
131135
}
132136

133137
/// Records `region` as being live at all the given `points`.
134138
pub(crate) fn add_points(&mut self, region: RegionVid, points: &IntervalSet<PointIndex>) {
139+
debug_assert!(
140+
points.iter().all(|point| self.location_map.point_in_range(point)),
141+
"Tried inserting region {region:?} with some points not belonging to this body!"
142+
);
135143
debug!("LivenessValues::add_points(region={:?}, points={:?})", region, points);
136144
match &mut self.live_regions {
137145
LiveRegions::AtPoints(these_points) => {
138146
these_points.union_row(region, points);
139147
}
140-
LiveRegions::InBody(live_regions)
141-
if points.iter().any(|point| self.location_map.point_in_range(point)) =>
142-
{
148+
LiveRegions::InBody(live_regions) => {
143149
live_regions.insert(region);
144150
}
145-
LiveRegions::InBody(_) => (),
146151
};
147152
}
148153

149154
/// Records `region` as being live at all the control-flow points.
155+
#[instrument(skip(self))]
150156
pub(crate) fn add_all_points(&mut self, region: RegionVid) {
151157
match &mut self.live_regions {
152158
LiveRegions::AtPoints(points) => points.insert_all_into_row(region),
@@ -172,10 +178,7 @@ impl LivenessValues {
172178

173179
/// Returns an iterator of all the points where `region` is live.
174180
fn live_points(&self, region: RegionVid) -> impl Iterator<Item = PointIndex> {
175-
self.point_liveness(region)
176-
.into_iter()
177-
.flat_map(|set| set.iter())
178-
.take_while(|&p| self.location_map.point_in_range(p))
181+
self.point_liveness(region).into_iter().flat_map(|set| set.iter())
179182
}
180183

181184
/// For debugging purposes, returns a pretty-printed string of the points where the `region` is
@@ -343,11 +346,10 @@ impl<'tcx, N: Idx> RegionValues<'tcx, N> {
343346

344347
/// Returns the locations contained within a given region `r`.
345348
pub(crate) fn locations_outlived_by(&self, r: N) -> impl Iterator<Item = Location> {
346-
self.points.row(r).into_iter().flat_map(move |set| {
347-
set.iter()
348-
.take_while(move |&p| self.location_map.point_in_range(p))
349-
.map(move |p| self.location_map.to_location(p))
350-
})
349+
self.points
350+
.row(r)
351+
.into_iter()
352+
.flat_map(move |set| set.iter().map(move |p| self.location_map.to_location(p)))
351353
}
352354

353355
/// Returns just the universal regions that are contained in a given region's value.
@@ -413,11 +415,7 @@ pub(crate) fn pretty_print_points(
413415
points: impl IntoIterator<Item = PointIndex>,
414416
) -> String {
415417
pretty_print_region_elements(
416-
points
417-
.into_iter()
418-
.take_while(|&p| location_map.point_in_range(p))
419-
.map(|p| location_map.to_location(p))
420-
.map(RegionElement::Location),
418+
points.into_iter().map(|p| location_map.to_location(p)).map(RegionElement::Location),
421419
)
422420
}
423421

compiler/rustc_builtin_macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ rustc_session = { path = "../rustc_session" }
2929
rustc_span = { path = "../rustc_span" }
3030
rustc_target = { path = "../rustc_target" }
3131
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
32-
thin-vec = "0.2.15"
32+
thin-vec = "0.2.18"
3333
tracing = "0.1"
3434
# tidy-alphabetical-end
3535

compiler/rustc_data_structures/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ smallvec = { version = "1.8.1", features = [
3030
] }
3131
stacker = "0.1.17"
3232
tempfile = "3.2"
33-
thin-vec = "0.2.15"
33+
thin-vec = "0.2.18"
3434
tracing = "0.1"
3535
# tidy-alphabetical-end
3636

0 commit comments

Comments
 (0)