From 07c8a25f42d1dcd8bd2bd22c8804e4bc5b6583a9 Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Mon, 31 Oct 2016 23:14:27 +0900 Subject: [PATCH] Remove unused type aliases --- src/librustc_borrowck/borrowck/mir/abs_domain.rs | 6 ++---- src/librustc_borrowck/borrowck/mod.rs | 2 -- src/librustc_incremental/persist/load.rs | 2 -- src/librustc_resolve/macros.rs | 3 --- src/librustc_trans/adt.rs | 6 ------ src/librustc_typeck/astconv.rs | 2 -- src/libstd/collections/hash/table.rs | 4 ---- 7 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/librustc_borrowck/borrowck/mir/abs_domain.rs b/src/librustc_borrowck/borrowck/mir/abs_domain.rs index dc450433ad9fa..5e61c2ec7a292 100644 --- a/src/librustc_borrowck/borrowck/mir/abs_domain.rs +++ b/src/librustc_borrowck/borrowck/mir/abs_domain.rs @@ -21,13 +21,11 @@ //! `a[x]` would still overlap them both. But that is not this //! representation does today.) -use rustc::mir::{Lvalue, LvalueElem}; -use rustc::mir::{Operand, Projection, ProjectionElem}; +use rustc::mir::LvalueElem; +use rustc::mir::{Operand, ProjectionElem}; #[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)] pub struct AbstractOperand; -pub type AbstractProjection<'tcx> = - Projection<'tcx, Lvalue<'tcx>, AbstractOperand>; pub type AbstractElem<'tcx> = ProjectionElem<'tcx, AbstractOperand>; diff --git a/src/librustc_borrowck/borrowck/mod.rs b/src/librustc_borrowck/borrowck/mod.rs index ef6936b6e7db3..f85309cf51818 100644 --- a/src/librustc_borrowck/borrowck/mod.rs +++ b/src/librustc_borrowck/borrowck/mod.rs @@ -300,8 +300,6 @@ struct BorrowStats { guaranteed_paths: usize } -pub type BckResult<'tcx, T> = Result>; - /////////////////////////////////////////////////////////////////////////// // Loans and loan paths diff --git a/src/librustc_incremental/persist/load.rs b/src/librustc_incremental/persist/load.rs index 1f43e79ace3ae..7cef246b6cb2c 100644 --- a/src/librustc_incremental/persist/load.rs +++ b/src/librustc_incremental/persist/load.rs @@ -32,8 +32,6 @@ use super::file_format; pub type DirtyNodes = FnvHashSet>; -type CleanEdges = Vec<(DepNode, DepNode)>; - /// If we are in incremental mode, and a previous dep-graph exists, /// then load up those nodes/edges that are still valid into the /// dep-graph for this session. (This is assumed to be running very diff --git a/src/librustc_resolve/macros.rs b/src/librustc_resolve/macros.rs index 72e5823598ea1..ed46c1d96ad17 100644 --- a/src/librustc_resolve/macros.rs +++ b/src/librustc_resolve/macros.rs @@ -12,7 +12,6 @@ use {Module, Resolver}; use build_reduced_graph::BuildReducedGraphVisitor; use rustc::hir::def_id::{CRATE_DEF_INDEX, DefIndex}; use rustc::hir::map::{self, DefCollector}; -use rustc::util::nodemap::FnvHashMap; use std::cell::Cell; use std::rc::Rc; use syntax::ast; @@ -80,8 +79,6 @@ pub struct LegacyBinding<'a> { span: Span, } -pub type LegacyImports = FnvHashMap, Span)>; - impl<'a> base::Resolver for Resolver<'a> { fn next_node_id(&mut self) -> ast::NodeId { self.session.next_node_id() diff --git a/src/librustc_trans/adt.rs b/src/librustc_trans/adt.rs index c6f3ef0a5beed..4d3361c1873f0 100644 --- a/src/librustc_trans/adt.rs +++ b/src/librustc_trans/adt.rs @@ -48,7 +48,6 @@ use std; use llvm::{ValueRef, True, IntEQ, IntNE}; use rustc::ty::layout; use rustc::ty::{self, Ty, AdtKind}; -use syntax::attr; use build::*; use common::*; use debuginfo::DebugLoc; @@ -66,8 +65,6 @@ pub enum BranchKind { Single } -type Hint = attr::ReprAttr; - #[derive(Copy, Clone)] pub struct MaybeSizedValue { pub value: ValueRef, @@ -119,9 +116,6 @@ fn compute_fields<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, t: Ty<'tcx>, } } -/// This represents the (GEP) indices to follow to get to the discriminant field -pub type DiscrField = Vec; - /// LLVM-level types are a little complicated. /// /// C-like enums need to be actual ints, not wrapped in a struct, diff --git a/src/librustc_typeck/astconv.rs b/src/librustc_typeck/astconv.rs index 8799050b1b999..1aa502fc443ec 100644 --- a/src/librustc_typeck/astconv.rs +++ b/src/librustc_typeck/astconv.rs @@ -171,8 +171,6 @@ struct ConvertedBinding<'tcx> { span: Span, } -type TraitAndProjections<'tcx> = (ty::PolyTraitRef<'tcx>, Vec>); - /// Dummy type used for the `Self` of a `TraitRef` created for converting /// a trait object, and which gets removed in `ExistentialTraitRef`. /// This type must not appear anywhere in other converted types. diff --git a/src/libstd/collections/hash/table.rs b/src/libstd/collections/hash/table.rs index b357bc3552a5e..73e9f1a500437 100644 --- a/src/libstd/collections/hash/table.rs +++ b/src/libstd/collections/hash/table.rs @@ -113,10 +113,6 @@ pub struct FullBucket { table: M, } -pub type EmptyBucketImm<'table, K, V> = EmptyBucket>; -pub type FullBucketImm<'table, K, V> = FullBucket>; - -pub type EmptyBucketMut<'table, K, V> = EmptyBucket>; pub type FullBucketMut<'table, K, V> = FullBucket>; pub enum BucketState {