Fix comment for get_region_var_origins
This commit is contained in:
parent
e4106065bf
commit
0e01088f07
1 changed files with 5 additions and 5 deletions
|
@ -1195,15 +1195,15 @@ impl<'tcx> InferCtxt<'tcx> {
|
||||||
.var_origin(vid)
|
.var_origin(vid)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Takes ownership of the list of variable regions. This implies
|
/// Clone the list of variable regions. This is used only during NLL processing
|
||||||
/// that all the region constraints have already been taken, and
|
/// to put the set of region variables into the NLL region context.
|
||||||
/// 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.
|
|
||||||
pub fn get_region_var_origins(&self) -> VarInfos {
|
pub fn get_region_var_origins(&self) -> VarInfos {
|
||||||
let mut inner = self.inner.borrow_mut();
|
let mut inner = self.inner.borrow_mut();
|
||||||
let (var_infos, data) = inner
|
let (var_infos, data) = inner
|
||||||
.region_constraint_storage
|
.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()
|
.clone()
|
||||||
.expect("regions already resolved")
|
.expect("regions already resolved")
|
||||||
.with_log(&mut inner.undo_log)
|
.with_log(&mut inner.undo_log)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue