diff options
| author | Rémy Rakic <remy.rakic+github@gmail.com> | 2024-12-29 23:14:22 +0000 |
|---|---|---|
| committer | Rémy Rakic <remy.rakic+github@gmail.com> | 2024-12-30 06:51:16 +0000 |
| commit | b0fc1d47d5dcffb5d516059d4a5af3b6843132d5 (patch) | |
| tree | 08f69bd581e508f506bf97978afd2ef8d8ac9efe /compiler/rustc_borrowck/src | |
| parent | 8cdc67ed23e486a9f2b3e667a50d9b8782ba4056 (diff) | |
| download | rust-b0fc1d47d5dcffb5d516059d4a5af3b6843132d5.tar.gz rust-b0fc1d47d5dcffb5d516059d4a5af3b6843132d5.zip | |
fix a couple nits
- remove unneeded type ascription - fix variable name - fix typo in comment - fix `var_origins` var and function name: these are `VarInfos`
Diffstat (limited to 'compiler/rustc_borrowck/src')
| -rw-r--r-- | compiler/rustc_borrowck/src/lib.rs | 7 | ||||
| -rw-r--r-- | compiler/rustc_borrowck/src/nll.rs | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs index 8b968177c3c..e99c7e03313 100644 --- a/compiler/rustc_borrowck/src/lib.rs +++ b/compiler/rustc_borrowck/src/lib.rs @@ -120,11 +120,10 @@ fn mir_borrowck(tcx: TyCtxt<'_>, def: LocalDefId) -> &BorrowCheckResult<'_> { return tcx.arena.alloc(result); } - let promoted: &IndexSlice<_, _> = &promoted.borrow(); - let opt_closure_req = do_mir_borrowck(tcx, input_body, promoted, None).0; + let borrowck_result = do_mir_borrowck(tcx, input_body, &*promoted.borrow(), None).0; debug!("mir_borrowck done"); - tcx.arena.alloc(opt_closure_req) + tcx.arena.alloc(borrowck_result) } /// Perform the actual borrow checking. @@ -215,7 +214,7 @@ fn do_mir_borrowck<'tcx>( consumer_options, ); - // Dump MIR results into a file, if that is enabled. This let us + // Dump MIR results into a file, if that is enabled. This lets us // write unit-tests, as well as helping with debugging. nll::dump_nll_mir(&infcx, body, ®ioncx, &opt_closure_req, &borrow_set); diff --git a/compiler/rustc_borrowck/src/nll.rs b/compiler/rustc_borrowck/src/nll.rs index 4428e695844..5113ca063c6 100644 --- a/compiler/rustc_borrowck/src/nll.rs +++ b/compiler/rustc_borrowck/src/nll.rs @@ -121,7 +121,7 @@ pub(crate) fn compute_regions<'a, 'tcx>( // Create the region inference context, taking ownership of the // region inference data that was contained in `infcx`, and the // base constraints generated by the type-check. - let var_origins = infcx.get_region_var_origins(); + let var_infos = infcx.get_region_var_infos(); // If requested, emit legacy polonius facts. polonius::legacy::emit_facts( @@ -137,7 +137,7 @@ pub(crate) fn compute_regions<'a, 'tcx>( let mut regioncx = RegionInferenceContext::new( infcx, - var_origins, + var_infos, constraints, universal_region_relations, elements, |
