Skip to content

Commit dbcce10

Browse files
committed
Remove unused struct ClosureUpvar
1 parent 7e393b5 commit dbcce10

File tree

3 files changed

+1
-14
lines changed

3 files changed

+1
-14
lines changed

src/librustc/ty/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -809,13 +809,6 @@ pub struct UpvarBorrow<'tcx> {
809809
pub type UpvarListMap = FxHashMap<DefId, FxIndexMap<hir::HirId, UpvarId>>;
810810
pub type UpvarCaptureMap<'tcx> = FxHashMap<UpvarId, UpvarCapture<'tcx>>;
811811

812-
#[derive(Copy, Clone, TypeFoldable)]
813-
pub struct ClosureUpvar<'tcx> {
814-
pub res: Res,
815-
pub span: Span,
816-
pub ty: Ty<'tcx>,
817-
}
818-
819812
#[derive(Clone, Copy, PartialEq, Eq)]
820813
pub enum IntVarValue {
821814
IntType(ast::IntTy),

src/librustc/ty/structural_impls.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ impl fmt::Debug for ty::AdtDef {
4545
}
4646
}
4747

48-
impl fmt::Debug for ty::ClosureUpvar<'tcx> {
49-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
50-
write!(f, "ClosureUpvar({:?},{:?})", self.res, self.ty)
51-
}
52-
}
53-
5448
impl fmt::Debug for ty::UpvarId {
5549
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5650
let name = ty::tls::with(|tcx| tcx.hir().name(self.var_path.hir_id));

src/librustc_typeck/check/upvar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
209209
}
210210
}
211211

212-
// Returns a list of `ClosureUpvar`s for each upvar.
212+
// Returns a list of `Ty`s for each upvar.
213213
fn final_upvar_tys(&self, closure_id: hir::HirId) -> Vec<Ty<'tcx>> {
214214
// Presently an unboxed closure type cannot "escape" out of a
215215
// function, so we will only encounter ones that originated in the

0 commit comments

Comments
 (0)