diff options
| author | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-06-06 18:50:38 +0000 |
|---|---|---|
| committer | Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> | 2023-06-06 18:50:38 +0000 |
| commit | 0e01088f077c572bbca791fbed54c1bbe80afdb0 (patch) | |
| tree | fe708b5560bf9917ac3b63617e8a8139ade0e675 | |
| parent | e4106065bf1bb515935d5d024e8d9c86454e2b22 (diff) | |
| download | rust-0e01088f077c572bbca791fbed54c1bbe80afdb0.tar.gz rust-0e01088f077c572bbca791fbed54c1bbe80afdb0.zip | |
Fix comment for `get_region_var_origins`
| -rw-r--r-- | compiler/rustc_infer/src/infer/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs index 447d4c9f84b..f36102fe2ea 100644 --- a/compiler/rustc_infer/src/infer/mod.rs +++ b/compiler/rustc_infer/src/infer/mod.rs @@ -1195,15 +1195,15 @@ impl<'tcx> InferCtxt<'tcx> { .var_origin(vid) } - /// Takes ownership of the list of variable regions. This implies - /// that all the region constraints have already been taken, and - /// hence that `resolve_regions_and_report_errors` can never be - /// called. This is used only during NLL processing to "hand off" ownership - /// of the set of region variables into the NLL region context. + /// Clone the list of variable regions. This is used only during NLL processing + /// to put the set of region variables into the NLL region context. pub fn get_region_var_origins(&self) -> VarInfos { let mut inner = self.inner.borrow_mut(); let (var_infos, data) = inner .region_constraint_storage + // We clone instead of taking because borrowck still wants to use + // the inference context after calling this for diagnostics + // and the new trait solver. .clone() .expect("regions already resolved") .with_log(&mut inner.undo_log) |
