From bbbdcb327f49274cf48a3d010c715dcdc3999d81 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Fri, 20 Aug 2021 13:36:30 +0000 Subject: [PATCH] Update some comments --- compiler/rustc_middle/src/ty/sty.rs | 1 + compiler/rustc_typeck/src/check/upvar.rs | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index 7d4af6cfa4052..a53d5f6626bb2 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -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 diff --git a/compiler/rustc_typeck/src/check/upvar.rs b/compiler/rustc_typeck/src/check/upvar.rs index becae6c9dc920..0482e8b895b56 100644 --- a/compiler/rustc_typeck/src/check/upvar.rs +++ b/compiler/rustc_typeck/src/check/upvar.rs @@ -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> { - // 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)