diff options
| author | Shotaro Yamada <sinkuu@sinkuu.xyz> | 2020-01-09 11:47:32 +0900 |
|---|---|---|
| committer | Shotaro Yamada <sinkuu@sinkuu.xyz> | 2020-01-09 11:47:32 +0900 |
| commit | dbcce10bb1c3e9651b83f1d9396813c0cd1054f6 (patch) | |
| tree | 2c6d866d9bd5b965490fa7b6c1b22d556186d18d | |
| parent | 7e393b5b3b543d355ae16c1940cf98b6c7fcb8aa (diff) | |
| download | rust-dbcce10bb1c3e9651b83f1d9396813c0cd1054f6.tar.gz rust-dbcce10bb1c3e9651b83f1d9396813c0cd1054f6.zip | |
Remove unused `struct ClosureUpvar`
| -rw-r--r-- | src/librustc/ty/mod.rs | 7 | ||||
| -rw-r--r-- | src/librustc/ty/structural_impls.rs | 6 | ||||
| -rw-r--r-- | src/librustc_typeck/check/upvar.rs | 2 |
3 files changed, 1 insertions, 14 deletions
diff --git a/src/librustc/ty/mod.rs b/src/librustc/ty/mod.rs index 7cca12308e6..0aacc5feec3 100644 --- a/src/librustc/ty/mod.rs +++ b/src/librustc/ty/mod.rs @@ -809,13 +809,6 @@ pub struct UpvarBorrow<'tcx> { pub type UpvarListMap = FxHashMap<DefId, FxIndexMap<hir::HirId, UpvarId>>; pub type UpvarCaptureMap<'tcx> = FxHashMap<UpvarId, UpvarCapture<'tcx>>; -#[derive(Copy, Clone, TypeFoldable)] -pub struct ClosureUpvar<'tcx> { - pub res: Res, - pub span: Span, - pub ty: Ty<'tcx>, -} - #[derive(Clone, Copy, PartialEq, Eq)] pub enum IntVarValue { IntType(ast::IntTy), diff --git a/src/librustc/ty/structural_impls.rs b/src/librustc/ty/structural_impls.rs index d87296c03dd..5e24c843025 100644 --- a/src/librustc/ty/structural_impls.rs +++ b/src/librustc/ty/structural_impls.rs @@ -45,12 +45,6 @@ impl fmt::Debug for ty::AdtDef { } } -impl fmt::Debug for ty::ClosureUpvar<'tcx> { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "ClosureUpvar({:?},{:?})", self.res, self.ty) - } -} - impl fmt::Debug for ty::UpvarId { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let name = ty::tls::with(|tcx| tcx.hir().name(self.var_path.hir_id)); diff --git a/src/librustc_typeck/check/upvar.rs b/src/librustc_typeck/check/upvar.rs index be912b6bcaf..a1922166fe2 100644 --- a/src/librustc_typeck/check/upvar.rs +++ b/src/librustc_typeck/check/upvar.rs @@ -209,7 +209,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } } - // Returns a list of `ClosureUpvar`s for each upvar. + // Returns a list of `Ty`s for each upvar. fn final_upvar_tys(&self, closure_id: hir::HirId) -> Vec<Ty<'tcx>> { // Presently an unboxed closure type cannot "escape" out of a // function, so we will only encounter ones that originated in the |
