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 368e2fd

Browse files
committedJul 29, 2024
Auto merge of #128360 - matthiaskrgr:rollup-wwy5mkj, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #126247 (rustdoc: word wrap CamelCase in the item list table and sidebar) - #128104 (Not lint pub structs without pub constructors intentionally) - #128153 (Stop using `MoveDataParamEnv` for places that don't need a param-env) - #128284 (Stabilize offset_of_nested) - #128342 (simplify the use of `CiEnv`) - #128355 (triagebot: make sure Nora is called Nora) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 612a33f + c261620 commit 368e2fd

File tree

70 files changed

+478
-378
lines changed

Some content is hidden

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

70 files changed

+478
-378
lines changed
 

‎Cargo.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4826,6 +4826,7 @@ dependencies = [
48264826
"tracing",
48274827
"tracing-subscriber",
48284828
"tracing-tree",
4829+
"unicode-segmentation",
48294830
]
48304831

48314832
[[package]]

‎compiler/rustc_borrowck/src/lib.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ use rustc_mir_dataflow::impls::{
4545
use rustc_mir_dataflow::move_paths::{
4646
InitIndex, InitLocation, LookupResult, MoveData, MoveOutIndex, MovePathIndex,
4747
};
48-
use rustc_mir_dataflow::{Analysis, MoveDataParamEnv};
48+
use rustc_mir_dataflow::Analysis;
4949
use rustc_session::lint::builtin::UNUSED_MUT;
5050
use rustc_span::{Span, Symbol};
5151
use rustc_target::abi::FieldIdx;
@@ -194,17 +194,15 @@ fn do_mir_borrowck<'tcx>(
194194
.iter_enumerated()
195195
.map(|(idx, body)| (idx, MoveData::gather_moves(body, tcx, param_env, |_| true)));
196196

197-
let mdpe = MoveDataParamEnv { move_data, param_env };
198-
199-
let mut flow_inits = MaybeInitializedPlaces::new(tcx, body, &mdpe)
197+
let mut flow_inits = MaybeInitializedPlaces::new(tcx, body, &move_data)
200198
.into_engine(tcx, body)
201199
.pass_name("borrowck")
202200
.iterate_to_fixpoint()
203201
.into_results_cursor(body);
204202

205203
let locals_are_invalidated_at_exit = tcx.hir().body_owner_kind(def).is_fn_or_closure();
206204
let borrow_set =
207-
Rc::new(BorrowSet::build(tcx, body, locals_are_invalidated_at_exit, &mdpe.move_data));
205+
Rc::new(BorrowSet::build(tcx, body, locals_are_invalidated_at_exit, &move_data));
208206

209207
// Compute non-lexical lifetimes.
210208
let nll::NllOutput {
@@ -222,7 +220,7 @@ fn do_mir_borrowck<'tcx>(
222220
&location_table,
223221
param_env,
224222
&mut flow_inits,
225-
&mdpe.move_data,
223+
&move_data,
226224
&borrow_set,
227225
tcx.closure_captures(def),
228226
consumer_options,
@@ -254,11 +252,11 @@ fn do_mir_borrowck<'tcx>(
254252
.into_engine(tcx, body)
255253
.pass_name("borrowck")
256254
.iterate_to_fixpoint();
257-
let flow_uninits = MaybeUninitializedPlaces::new(tcx, body, &mdpe)
255+
let flow_uninits = MaybeUninitializedPlaces::new(tcx, body, &move_data)
258256
.into_engine(tcx, body)
259257
.pass_name("borrowck")
260258
.iterate_to_fixpoint();
261-
let flow_ever_inits = EverInitializedPlaces::new(body, &mdpe)
259+
let flow_ever_inits = EverInitializedPlaces::new(body, &move_data)
262260
.into_engine(tcx, body)
263261
.pass_name("borrowck")
264262
.iterate_to_fixpoint();
@@ -324,7 +322,7 @@ fn do_mir_borrowck<'tcx>(
324322
infcx: &infcx,
325323
param_env,
326324
body,
327-
move_data: &mdpe.move_data,
325+
move_data: &move_data,
328326
location_table: &location_table,
329327
movable_coroutine,
330328
locals_are_invalidated_at_exit,

0 commit comments

Comments
 (0)
Please sign in to comment.