File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
compiler/rustc_infer/src/infer Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1195,15 +1195,15 @@ impl<'tcx> InferCtxt<'tcx> {
11951195 . var_origin ( vid)
11961196 }
11971197
1198- /// Takes ownership of the list of variable regions. This implies
1199- /// that all the region constraints have already been taken, and
1200- /// hence that `resolve_regions_and_report_errors` can never be
1201- /// called. This is used only during NLL processing to "hand off" ownership
1202- /// of the set of region variables into the NLL region context.
1198+ /// Clone the list of variable regions. This is used only during NLL processing
1199+ /// to put the set of region variables into the NLL region context.
12031200 pub fn get_region_var_origins ( & self ) -> VarInfos {
12041201 let mut inner = self . inner . borrow_mut ( ) ;
12051202 let ( var_infos, data) = inner
12061203 . region_constraint_storage
1204+ // We clone instead of taking because borrowck still wants to use
1205+ // the inference context after calling this for diagnostics
1206+ // and the new trait solver.
12071207 . clone ( )
12081208 . expect ( "regions already resolved" )
12091209 . with_log ( & mut inner. undo_log )
You can’t perform that action at this time.
0 commit comments