Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 794c124

Browse files
committedFeb 21, 2025
Auto merge of #137397 - matthiaskrgr:rollup-ls2pilo, r=matthiaskrgr
Rollup of 10 pull requests Successful merges: - #132876 (rustdoc book: acknowledge --document-hidden-items) - #136148 (Optionally add type names to `TypeId`s.) - #136609 (libcore/net: `IpAddr::as_octets()`) - #137336 (Stabilise `os_str_display`) - #137350 (Move methods from Map to TyCtxt, part 3.) - #137353 (Implement `read_buf` for WASI stdin) - #137361 (Refactor `OperandRef::extract_field` to prep for MCP838) - #137367 (Do not exempt nonexistent platforms from platform policy) - #137374 (Stacker now handles miri using a noop impl itself) - #137392 (remove few unused fields) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 71e06b9 + cfc2d11 commit 794c124

File tree

126 files changed

+422
-351
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+422
-351
lines changed
 

‎Cargo.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2751,9 +2751,9 @@ dependencies = [
27512751

27522752
[[package]]
27532753
name = "psm"
2754-
version = "0.1.24"
2754+
version = "0.1.25"
27552755
source = "registry+https://github.com/rust-lang/crates.io-index"
2756-
checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810"
2756+
checksum = "f58e5423e24c18cc840e1c98370b3993c6649cd1678b4d24318bcf0a083cbe88"
27572757
dependencies = [
27582758
"cc",
27592759
]
@@ -4947,9 +4947,9 @@ dependencies = [
49474947

49484948
[[package]]
49494949
name = "stacker"
4950-
version = "0.1.17"
4950+
version = "0.1.18"
49514951
source = "registry+https://github.com/rust-lang/crates.io-index"
4952-
checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b"
4952+
checksum = "1d08feb8f695b465baed819b03c128dc23f57a694510ab1f06c77f763975685e"
49534953
dependencies = [
49544954
"cc",
49554955
"cfg-if",

‎compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,6 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
386386
}
387387
}
388388
let tcx = self.infcx.tcx;
389-
let hir = self.infcx.tcx.hir();
390389
if let Some(body) = tcx.hir_maybe_body_owned_by(self.mir_def_id()) {
391390
let expr = body.value;
392391
let place = &self.move_data.move_paths[mpi].place;
@@ -402,7 +401,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
402401
if let Some(span) = span
403402
&& let Some(expr) = finder.expr
404403
{
405-
for (_, expr) in hir.parent_iter(expr.hir_id) {
404+
for (_, expr) in tcx.hir_parent_iter(expr.hir_id) {
406405
if let hir::Node::Expr(expr) = expr {
407406
if expr.span.contains(span) {
408407
// If the let binding occurs within the same loop, then that
@@ -969,7 +968,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
969968
let mut parent = None;
970969
// The top-most loop where the moved expression could be moved to a new binding.
971970
let mut outer_most_loop: Option<&hir::Expr<'_>> = None;
972-
for (_, node) in tcx.hir().parent_iter(expr.hir_id) {
971+
for (_, node) in tcx.hir_parent_iter(expr.hir_id) {
973972
let e = match node {
974973
hir::Node::Expr(e) => e,
975974
hir::Node::LetStmt(hir::LetStmt { els: Some(els), .. }) => {
@@ -1021,8 +1020,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
10211020
}
10221021
}
10231022
let loop_count: usize = tcx
1024-
.hir()
1025-
.parent_iter(expr.hir_id)
1023+
.hir_parent_iter(expr.hir_id)
10261024
.map(|(_, node)| match node {
10271025
hir::Node::Expr(hir::Expr { kind: hir::ExprKind::Loop(..), .. }) => 1,
10281026
_ => 0,
@@ -1048,8 +1046,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
10481046
.collect::<Vec<Span>>();
10491047
// All of the spans for the loops above the expression with the move error.
10501048
let loop_spans: Vec<_> = tcx
1051-
.hir()
1052-
.parent_iter(expr.hir_id)
1049+
.hir_parent_iter(expr.hir_id)
10531050
.filter_map(|(_, node)| match node {
10541051
hir::Node::Expr(hir::Expr { span, kind: hir::ExprKind::Loop(..), .. }) => {
10551052
Some(*span)
@@ -1334,7 +1331,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
13341331
}
13351332

13361333
fn in_move_closure(&self, expr: &hir::Expr<'_>) -> bool {
1337-
for (_, node) in self.infcx.tcx.hir().parent_iter(expr.hir_id) {
1334+
for (_, node) in self.infcx.tcx.hir_parent_iter(expr.hir_id) {
13381335
if let hir::Node::Expr(hir::Expr { kind: hir::ExprKind::Closure(closure), .. }) = node
13391336
&& let hir::CaptureBy::Value { .. } = closure.capture_clause
13401337
{
@@ -2118,7 +2115,6 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
21182115
issued_span: Span,
21192116
) {
21202117
let tcx = self.infcx.tcx;
2121-
let hir = tcx.hir();
21222118

21232119
let has_split_at_mut = |ty: Ty<'tcx>| {
21242120
let ty = ty.peel_refs();
@@ -2171,7 +2167,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
21712167
return;
21722168
};
21732169

2174-
let Some(object) = hir.parent_id_iter(index1.hir_id).find_map(|id| {
2170+
let Some(object) = tcx.hir_parent_id_iter(index1.hir_id).find_map(|id| {
21752171
if let hir::Node::Expr(expr) = tcx.hir_node(id)
21762172
&& let hir::ExprKind::Index(obj, ..) = expr.kind
21772173
{
@@ -2189,7 +2185,7 @@ impl<'infcx, 'tcx> MirBorrowckCtxt<'_, 'infcx, 'tcx> {
21892185
return;
21902186
};
21912187

2192-
let Some(swap_call) = hir.parent_id_iter(object.hir_id).find_map(|id| {
2188+
let Some(swap_call) = tcx.hir_parent_id_iter(object.hir_id).find_map(|id| {
21932189
if let hir::Node::Expr(call) = tcx.hir_node(id)
21942190
&& let hir::ExprKind::Call(callee, ..) = call.kind
21952191
&& let hir::ExprKind::Path(qpath) = callee.kind

0 commit comments

Comments
 (0)