Update some comments

This commit is contained in:
Oli Scherer 2021-08-20 13:36:30 +00:00 committed by Oli Scherer
parent a4c1cec4f8
commit bbbdcb327f
2 changed files with 1 additions and 5 deletions

View File

@ -152,6 +152,7 @@ pub enum TyKind<'tcx> {
/// The anonymous type of a closure. Used to represent the type of
/// `|a| a`.
/// For the order of the substs see the `ClosureSubsts` type's documentation.
Closure(DefId, SubstsRef<'tcx>),
/// The anonymous type of a generator. Used to represent the type of

View File

@ -335,11 +335,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// Returns a list of `Ty`s for each upvar.
fn final_upvar_tys(&self, closure_id: DefId) -> Vec<Ty<'tcx>> {
// Presently an unboxed closure type cannot "escape" out of a
// function, so we will only encounter ones that originated in the
// local crate or were inlined into it along with some function.
// This may change if abstract return types of some sort are
// implemented.
self.typeck_results
.borrow()
.closure_min_captures_flattened(closure_id)